I am looking forward to run commands and log their output in a temporary log file to be read later on by different processes.
So, for example: rc.d start ntpd > progress.txt
Returns:
::
Daemon script
ntpd
does not exist or is not executable.
I assume, that since it's an error it doesn't get redirected, but, is there a way to force redirect everything to file?
&>
is not available in all shells (e.g. older ones), so if you are ever in one of those and wonder why&>
doesn't work, it is equivalent to the more portable> file 2>&1
. – jw013 Sep 11 '12 at 14:37