|Matt Mossholder on 31 Aug 2011 08:48:34 -0700|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: [PLUG] Bash I/O redirection|
I have this bash script that does an oracle backup (launched via crontab), and I'd like to redirect the output of the script to a file. The classic ways to do it would be:
Â * use a wrapper script (that requires an additional script...)
Â * call the script with '>' in the cron line (make my cron line ugly)
Â * inside the script, put a ">>" after each command (berk !)
My question is: would there be a way to put a global redirection at the beginning of the script ?
Â "1 > /tmp/log.txt"
and then have all the subsequent commands go to the log file ?
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug