echo to screen AND file?

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
 
P

Paul R. Sadowski [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top