Re: ** UNIX : set echo on in shell
- From: Dan Norris <dannorris@xxxxxxxxxxxxx>
- To: mnavickas@xxxxxxxxx
- Date: Sat, 28 Feb 2009 20:46:45 -0600
|
Here's how I generally handle logging in most of my scripts (this is
obviously from an RMAN backup script): ################################################## ### Start log DT=`date +%Y%m%d%H%M%S` LOG=${LOGS_DEST}/RMAN_${ORACLE_SID}.${LOCALHOST}.INC_$2.$DT.log rm -f $LOG ### save the file descriptors exec 3>&1 exec 4>&2 ### set up output streams exec 1> $LOG exec 2>> $LOG ...do all my stuff here, all output (STDOUT and STDERR is automatically sent to the $LOG because of the commands above ...when I'm done, put this stuff at the bottom: ############################################################ ### Wrap up DT=`date +%Y%m%d%H%M%S` echo "Finished rman backup of $ORACLE_SID on $LOCALHOST (LEVEL $2) : " `date +%Y%m%d%H%M%S` ### restore the file descriptors exec 1>&3 exec 2>&4 Mindaugas Navickas wrote: -- http://www.freelists.org/webpage/oracle-l |
- References:
- ** UNIX : set echo on in shell
- From: A Joshi
- Re: ** UNIX : set echo on in shell
- From: Mindaugas Navickas
- ** UNIX : set echo on in shell
Other related posts:
- » ** UNIX : set echo on in shell - A Joshi
- » Re: ** UNIX : set echo on in shell - Howard Latham
- » Re: ** UNIX : set echo on in shell - Mindaugas Navickas
- » Re: ** UNIX : set echo on in shell - Dan Norris
- » Re: ** UNIX : set echo on in shell - Bradley S. Huffman
- » RE: ** UNIX : set echo on in shell - Herring Dave - dherri
- » Re: ** UNIX : set echo on in shell - Mike Haddon
- » Re: ** UNIX : set echo on in shell - A Joshi
- » Re: ** UNIX : set echo on in shell - Mike Haddon
- » Re: ** UNIX : set echo on in shell - Nigel Thomas
- » Re: ** UNIX : set echo on in shell - William Robertson
- » Re: ** UNIX : set echo on in shell - Jared Still
- » RE: ** UNIX : set echo on in shell - Mark W. Farnham
- » RE: ** UNIX : set echo on in shell - Mark W. Farnham