StackScript output to a log?
4 Replies
Or, if you don't care about stdout going to the console, you can just rebind stdout to a file like this (under bash):
exec >/root/stdout.txt
echo Stuff from here on inherits bash stdout, so it goes to the file
@sweh:
Do you also need a "exec 2>&1" to cover stderr?
Yes, you need to do this. Or you could simply type exec >/root/stdout.txt 2>&1