Subject: Re: [shell-discuss] Globally redirecting stdout
--------

> Howdy,
> 
> I am modifying a lengthy bash script, and would like to globally configure 
> stdou
> t to go to the console as well as a log file. Is there an easy way to do this 
> fr
> om a single location in a shell script? I really don't want to have to add "| 
> te
> e log" to each print statement.
> 
> Thanks for any insight,
> - Ryan
> --
> 

Modify the script by putting
(
as the first line and

) | tee file
as the last line.

David Korn
dgk at research.att.com

Reply via email to