LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   displaying content on the current terminal (https://www.linuxquestions.org/questions/linux-newbie-8/displaying-content-on-the-current-terminal-4175426666/)

abhinav4 09-11-2012 04:25 AM

displaying content on the current terminal
 
Hi I want to display the output of the command ls-l on the current terminal through script.
I can perform it through a variable but I do not remember it by doing without a variable.

terminal=`tty`
ls -l >$terminal

abhinav4 09-11-2012 05:39 AM

Quote:

Originally Posted by abhinav4 (Post 4777527)
Hi I want to display the output of the command ls-l on the current terminal through script.
I can perform it through a variable but I do not remember it by doing without a variable.

terminal=`tty`
ls -l >$terminal

Anyone??

pan64 09-11-2012 05:43 AM

why do you need any script? ls -l will automatically displayed on the current terminal.
Probably you mean ls -l >/dev/tty.

abhinav4 09-11-2012 05:55 AM

Quote:

Originally Posted by pan64 (Post 4777564)
why do you need any script? ls -l will automatically displayed on the current terminal.
Probably you mean ls -l >/dev/tty.

Ok i got it, there was a little confusion like if i am changing terminals and running the script, will it work but now its clear. Thanks


All times are GMT -5. The time now is 02:27 AM.