echo to screen AND file?

  • Thread starter Thread starter Thomas Karer
  • Start date Start date
T

Thomas Karer

i want do have the output log of my copy jobs to screen AND file, but how?

echo test >log.txt writes this fine to the file but how to output on screen
AND write to file?

thank you
tom
 
Hello, Thomas:
On Sun, 6 Feb 2005 15:38:51 +0100: you wrote...

TK> i want do have the output log of my copy jobs to screen AND file, but
TK> how?

You use a little utilit y called TEE available here
http://unxutils.sourceforge.net/

echo test| tee -a log.txt (the -a switch means to append to the output file)

Or without tee but using your example:
echo test
echo test>log.txt
 
Back
Top