Jim,
Thanks very much.
I modified the routine as below. I know not exactly to your recommendations. But why does it run into a infinite loop ? Please can you explain ?
HTML Code:
uncompress () {
PARFILE=/gbwaaposoa2q4/ora01/app/oracle/orajobs/metadata
cat ${PARFILE} | while read line
do
TABNAME=`echo $line | awk '{print $1}'`
PART=`echo $line | awk '{print $2}'`
REF=`echo $line | awk '{print $3}'`
echo "Table name is ${TABNAME}"
echo "partition name is ${PART}"
echo "Business ref is ${REF}"
DMPFILE=${EXPDIR}/${TABNAME}_PRT_${PART}.dmp
echo "exp dir is $EXPDIR "
if [[ ! -f ${DMPFILE} && ! -f ${DMPFILE}.Z ]] ; then
echoLog "Dump file ${DMPFILE} does not exist. "
continue
fi
[ -f ${DMPFILE} ] && echoLog "${DMPFILE} already exists uncompressed"
[ -f ${DMPFILE}.Z ] && uncompress ${DMPFILE}.Z && echoLog "uncompressed ${DMPFILE}"
done
}
I was thinking that it should read one line at a time until the end of the file
Got this output
Table name is SOACOE_AUDIT
partition name is 24112008
Business ref is 'CoPeRSender_v1.2.0:SalesEntity_ID=160598319'
exp dir is /tmp
Table name is SOACOE_LOGGER_SUMMARY
partition name is 24112008
Business ref is 'CoPeRSender_v1.2.0:SalesEntity_ID=160598319'
exp dir is /tmp
09:44:23 /tmp/SOACOE_LOGGER_SUMMARY_PRT_24112008.dmp already exists uncompressed
Table name is SOACOE_AUDIT
partition name is 24112008
Business ref is 'CoPeRSender_v1.2.0:SalesEntity_ID=160598319'
exp dir is /tmp
Table name is SOACOE_LOGGER_SUMMARY
partition name is 24112008
Business ref is 'CoPeRSender_v1.2.0:SalesEntity_ID=160598319'
exp dir is /tmp
09:44:23 /tmp/SOACOE_LOGGER_SUMMARY_PRT_24112008.dmp already exists uncompressed
Table name is SOACOE_AUDIT
partition name is 24112008
Business ref is 'CoPeRSender_v1.2.0:SalesEntity_ID=160598319'
exp dir is /tmp
Table name is SOACOE_LOGGER_SUMMARY
partition name is 24112008
Business ref is 'CoPeRSender_v1.2.0:SalesEntity_ID=160598319'
exp dir is /tmp
09:44:23 /tmp/SOACOE_LOGGER_SUMMARY_PRT_24112008.dmp already exists uncompressed
Table name is SOACOE_AUDIT
partition name is 24112008
Business ref is 'CoPeRSender_v1.2.0:SalesEntity_ID=160598319'
exp dir is /tmp
Table name is SOACOE_LOGGER_SUMMARY
partition name is 24112008
Business ref is 'CoPeRSender_v1.2.0:SalesEntity_ID=160598319'
exp dir is /tmp
09:44:23 /tmp/SOACOE_LOGGER_SUMMARY_PRT_24112008.dmp already exists uncompressed
Table name is SOACOE_AUDIT
partition name is 24112008
Business ref is 'CoPeRSender_v1.2.0:SalesEntity_ID=160598319'
exp dir is /tmp
Table name is SOACOE_LOGGER_SUMMARY
partition name is 24112008
Business ref is 'CoPeRSender_v1.2.0:SalesEntity_ID=160598319'
exp dir is /tmp
Thanks in advance.