- Timestamp:
- 08/25/06 22:35:21 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r7944 r7945 40 40 41 41 runlogpath=$logpath/run/`date +%Y/%m/%d` 42 makedir $runlogpath 43 processlog=$runlogpath/process`date +%F`.log 42 processlog=$logpath/processlog/process`date +%F`.log 44 43 45 44 datetime=`date +%F-%H-%M-%S` … … 113 112 # defined 114 113 115 function printprocesslog116 {117 makedir $processlogpath118 echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "`basename $0`"["$$"] "$@ >> $processlog119 }120 121 # function to exit a script properly122 function finish()123 {124 rm -v $todofile125 rm -v $lockfile126 date127 printprocesslog "INFO finished $program"128 exit129 }130 131 # function to do continue in a loop and produce according logging132 function cont()133 {134 date135 echo ""136 continue137 }138 139 114 # function to make sure that a directory is made 140 115 function makedir() … … 149 124 fi 150 125 fi 126 } 127 makedir $runlogpath 128 makedir $processlogpath 129 130 131 function printprocesslog 132 { 133 makedir $processlogpath 134 echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "`basename $0`"["$$"] "$@ >> $processlog 135 } 136 137 # function to exit a script properly 138 function finish() 139 { 140 rm -v $todofile 141 rm -v $lockfile 142 date 143 printprocesslog "INFO finished $program" 144 exit 145 } 146 147 # function to do continue in a loop and produce according logging 148 function cont() 149 { 150 date 151 echo "" 152 continue 151 153 } 152 154
Note:
See TracChangeset
for help on using the changeset viewer.