Shell Script: How to write a string to file and to stdout on console?

The Solution to Shell Script: How to write a string to file and to stdout on console? is


Use the tee command:

echo "hello" | tee logfile.txt

~ Answered on 2014-03-28 13:04:26


Most Viewed Questions: