On 01/12/2011 01:07 PM, Josh Trutwin wrote:
> Curious if anyone can help me with this - I have a long running script 
> and I'd like to redirect both stdout and stderr to a log file, as well 
> as have the output visible on the console (that last part I could live 
> without - just run a tail -f after execution).
> 
> I've tried both of these after googling around:
> 
> ./prog.sh 2>&1 | tee prog.log

 This is the incantation I use, and it's worked for me as long as I can
remember (although in the test I just ran, it flipped the order of my
stdout/stderr prints -- odd).

     Jima