Posted on September 19, 2014, 9:26 pm
Suppose that you have a log file generate each time when you launch your script.
How can you read this file on the fly (while the script is writing in to that file) ?
./run-report.sh 2>&1 | tee /var/spt/log/runrepot.log
./run-report.sh > /var/spt/log/runrepot.log 2>&1 | tail -f /var/spt/log/runrepot.log
./run-report.sh > /var/spt/log/runrepot.log 2>&1 | watch tail -20 /var/spt/log/runrepot.log