LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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
 
Thread Tools
Old 08-22-2005, 11:37 AM   #1
user_linux
LQ Newbie
 
Registered: Jun 2005
Posts: 12
Thanked: 0
problem in restoring stdout to default


[Log in to get rid of this advertisement]
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?
user_linux is offline     Reply With Quote
Old 08-22-2005, 03:07 PM   #2
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190
Thanked: 0
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"
visaris is offline     Reply With Quote
Old 08-22-2005, 03:21 PM   #3
user_linux
LQ Newbie
 
Registered: Jun 2005
Posts: 12
Thanked: 0

Original Poster
I am using ksh.

exec >&1 does not work
user_linux is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 02:27 PM
Restoring Video Card Default Drivers Mack10 Linux - Newbie 1 03-03-2005 11:11 AM
Restoring Default KDE Menus Ovalteen Linux - General 3 11-03-2004 06:17 AM
restoring alsa settings to default prEying Linux - Hardware 1 09-01-2004 12:10 PM
#@!?£$# stdout problem!! beedyrazzle Linux - Newbie 3 01-21-2003 09:03 PM


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

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration