1)
Howto Linux print on terminal and write to a file simultaneously
$tail -f /var/log/upstart/ironic-api.log 2>&1 | tee a.txt
2)
Run command in watch mode and append output to a file and print in terminal
$watch "myscript.sh 2>&1 | tee -a mylog.txt"
Howto Linux print on terminal and write to a file simultaneously
$tail -f /var/log/upstart/ironic-api.log 2>&1 | tee a.txt
2)
Run command in watch mode and append output to a file and print in terminal
$watch "myscript.sh 2>&1 | tee -a mylog.txt"
No comments:
Post a Comment