LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-11-2012, 05:25 AM   #1
abhinav4
Member
 
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123

Rep: Reputation: 0
Exclamation 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
 
Old 09-11-2012, 06:39 AM   #2
abhinav4
Member
 
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by abhinav4 View Post
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??
 
Old 09-11-2012, 06:43 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
why do you need any script? ls -l will automatically displayed on the current terminal.
Probably you mean ls -l >/dev/tty.
 
Old 09-11-2012, 06:55 AM   #4
abhinav4
Member
 
Registered: Jun 2010
Location: India
Distribution: Fedora/Cent OS
Posts: 123

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
odbc (php output not displaying in web browser,but it displaying in terminal) manu@vssc Red Hat 1 06-29-2011 02:33 AM
Displaying Flash content on extended desktop phduval Linux - Software 4 12-10-2010 10:20 AM
Displaying current FTP connections munk78 Linux - Networking 1 06-07-2006 06:13 AM
eMachine, Fedora 3, Windows Content not displaying woofburgerjr Linux - Newbie 1 04-10-2005 06:40 PM


All times are GMT -5. The time now is 11:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration