scriptA.sh code
#! /usr/bin/sh . /app/HKBN/HKBN.env export YmdHMS=`date "+%Y%m%d%H%M%S"` JOBNAME=brx0378p; export JOBNAME; LOG=$BN_LOG_DIR/${JOBNAME}_${YmdHMS}.log; export LOG ERR=$BN_LOG_DIR/${JOBNAME}_${YmdHMS}.err; export ERR exec 1>>$LOG exec 2>>$ERR source /app/HKBN/cmd/itrbss-fs/smarthome-process/batch_job_control.sh source /app/HKBN/cmd/p_gen_job_detail.ksh cat $LOG | egrep -ie 'ORA-|error|warning|unable|invalid' >> $ERR exit 0