Hi,
I'd like to have a log file that
include both stdout and stderr from my script.
But in addition to this log file I also want
to get the script's stdout to the screen.
I wrote this script example:
-------------------------------------------------
#!/bin/ksh
rm mylog
exec 2>>mylog
print "stdout: start log file" |tee -a mylog
print -u2 "stderr: this is error message"
-------------------------------------------------
Is this correct?
Thanks in advance
Vadim
I'd like to have a log file that
include both stdout and stderr from my script.
But in addition to this log file I also want
to get the script's stdout to the screen.
I wrote this script example:
-------------------------------------------------
#!/bin/ksh
rm mylog
exec 2>>mylog
print "stdout: start log file" |tee -a mylog
print -u2 "stderr: this is error message"
-------------------------------------------------
Is this correct?
Thanks in advance
Vadim