To save some typing, you can group the commands together in a subshell and redirect the subshell's output instead.
( date; perl test.pl; date ) > test.log--k.
In reply to Re^2: Append the timestamp before and after the data in the logfile
by Kanji
in thread Append the timestamp before and after the data in the logfile
by kulls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |