kook44
August 3rd, 2006, 03:14 PM
So I have this bash script that does a bunch of nice things and I've put in a lot of nice verbose logging with echo statements, but I need to capture the stdout & stderr in a logfile. Now it's a bit more complicated than redirecting the output with a >. Since it will be run periodically with crontab, i need to specify a unique filename for the log each time. The script creates a directory based on the time & some other things, and i'd like to be able to put the log for each run in there. can anyone think of a better way to do this than adding a > to every statement in the script?
thx
thx