LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-22-2005, 10:37 AM   #1
user_linux
LQ Newbie
 
Registered: Jun 2005
Posts: 12

Rep: Reputation: 0
problem in restoring stdout to default


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

exec >logfile

This script also calls another shell script later.

My question is

how do I restore the standard output to default from the called script?
 
Old 08-22-2005, 02:07 PM   #2
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
I know this is covered in the REDIRECTION section of the "bash" manpage. Just type "man bash" to bring that up, it should help.

For the lazy answer, try this:
"exec >&1"
 
Old 08-22-2005, 02:21 PM   #3
user_linux
LQ Newbie
 
Registered: Jun 2005
Posts: 12

Original Poster
Rep: Reputation: 0
I am using ksh.

exec >&1 does not work
 
  


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
restoring default device ownerships/permissions under_r_run Linux - Newbie 5 07-27-2005 01:27 PM
Restoring Video Card Default Drivers Mack10 Linux - Newbie 1 03-03-2005 10:11 AM
Restoring Default KDE Menus Ovalteen Linux - General 3 11-03-2004 05:17 AM
restoring alsa settings to default prEying Linux - Hardware 1 09-01-2004 11:10 AM
#@!?$# stdout problem!! beedyrazzle Linux - Newbie 3 01-21-2003 08:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:57 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