Questions
You can add this line on top of your script:
#!/bin/bash # redirect stdout/stderr to a file exec &> logfile.txt
OR else to redirect only stdout use:
exec > logfile.txt
~ Answered on 2014-09-14 13:24:03