I'd like my cake & eat it too please! Log to both console and file
I have a bash job I run from a terminal which I just monitor from the screen. Now I have a need to do that and also log to file. If I use sh mybatch.sh > file.log I lose the console output. How can I do both please? Thanks
|
Hi,
Take a look at the tee command. command | tee outfile hope this helps. |
All times are GMT -5. The time now is 07:35 PM. |