The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sed redirection myle UNIX for Dummies Questions & Answers 3 03-12-2008 04:04 PM
csh stderr redirection jolok Shell Programming and Scripting 0 04-15-2005 07:03 AM
I/O redirection within a coprocess Mugin Shell Programming and Scripting 4 10-21-2003 05:17 AM
Help with redirection Shallon1 High Level Programming 2 12-12-2001 04:35 AM
redirection to tty** with cat zorro UNIX for Dummies Questions & Answers 1 11-02-2001 08:23 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #8  
Old 04-18-2008
Registered User
 

Join Date: Jul 2007
Posts: 93
hmmm, what part are you not understanding?

quine has told you how to do that with command line, then when you posted it didn't work when you placed it in the script, I posted "not in the script but on the command line".
The only other alternative, is the 2nd option, "within the script", and yes, you'd then need to put on every line there is output..... so why not put it on the command line?? it sounds like want you're wanting to do.

Suggestion: try it! if it doesn't work, post exactly what you typed, and the resulting output.
Reply With Quote
Forum Sponsor
  #9  
Old 04-18-2008
Registered User
 

Join Date: Oct 2007
Location: USA
Posts: 567
Re-direct stderr of the entire shell script with an exec placed at the top right after the shebang line.

Code:
#!/usr/bin/ksh

exec 2> file.err

.
.
.
Reply With Quote
  #10  
Old 04-18-2008
Registered User
 

Join Date: Jan 2008
Posts: 69
Thumbs up

Quote:
Originally Posted by shamrock View Post
Re-direct stderr of the entire shell script with an exec placed at the top right after the shebang line.

Code:
#!/usr/bin/ksh

exec 2> file.err

.
.
.
YES!
It was that i mean, I didn't know how to correctly write it.

Thank you shamrock
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:54 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0