on redirecting with 2>&1|tee yourlog.log

Tory Patnoe tpatnoe at qwest.net
Thu Jul 14 20:07:48 UTC 2005


>
> Hi Tory,
> thanks for that.
> first command is running well, and so i did the script now.
> unfortunately the second idea is not working. there is no output on 
> the  screen at all eventhough the output into the LOG is still working.
> anything more to tell?


That should work. Unless GNU tee is different than the tee which is on 
solaris. I'm at work so I can't test. Try:

echo "hello" | tee somelog.log
echo "hello" 2>&1 | tee somelog2.log

You should see this both in the log and to the terminal.

Tory





More information about the ubuntu-users mailing list