Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect output and stderr to screen and logfile

Status
Not open for further replies.

hok1man

Technical User
Feb 16, 2008
102
Hi guys,

I am struggling to find how to redirect output and stderr to screen and logfile ?

this is what I've done so far
start | tee /tmp/clearViewTrigger_start.log 2>&1

"start" is the name of function in the script

but the stderr did not go into the logfile.
Any help or idea ?
 
How about this:

Code:
start 2>&1| tee /tmp/clearViewTrigger_start.log

typed... not tested.

Regards,
Chuck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top