LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-17-2005, 01:27 PM   #1
user_linux
LQ Newbie
 
Registered: Jun 2005
Posts: 12

Rep: Reputation: 0
how to restore standard output


In my shell script i gave the following command to redirect the standard output to a logfile

exec >logfile

My question is

how do I restore the standard output to the terminal?
 
Old 06-17-2005, 01:55 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
I think you can just redirect back to /dev/tty, although it would be more normal to put the commands you want redirected into another script and run that script with redirected output:
Code:
/path/to/script >logfile
 
Old 06-17-2005, 02:29 PM   #3
user_linux
LQ Newbie
 
Registered: Jun 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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
standard output/system mail? gmon72 Linux - Newbie 2 10-13-2004 03:54 PM
standard output/system mail? gmon72 Linux - Newbie 1 10-13-2004 02:11 PM
redirectoring standard output phil123 Programming 6 02-25-2004 02:32 AM
how to redirecting the standard output in program phil123 Linux - General 3 02-23-2004 12:02 AM
Firestarter, standard output and logs jeempc Linux - Software 0 09-23-2003 10:47 PM


All times are GMT -5. The time now is 04:00 PM.

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