In the following code excerpt, please explain [ $? = 0 ] in the first if condition. Thank you.
java -XdoCloseWithReadPending -classpath .:UKtest.jaremandSchedule20.jar:$JDBC_PATH/classes111.zip hmi.common.uk.PullSignalConfirmExtract $ukFile $prod 2>err.out >> $LOGFILE
if [ $? = 0 ]
then
if [[ -s $ukFile ]]
then
. ukPricing_ftp.sh $ukServer $ukUser $ukPassword $ukFile mysign/$ukFile
grep -q '226 Transfer complete.' ftp.log
if [ $? -ne 0 ]
then
cat ftp.log | mailx -s " UK Pull Signal Confirm Extract: ftp to UK failed" ec_team@test.com
mv $ukFile $ukDir/data/error/$ukFile.$timestamp
else
mv $ukFile $ukDir/data/log/$ukFile.$timestamp
fi
else
echo "Nothing to extract. File has no data."
rm -f $ukFile
fi
else
cat err.out | mailx -s " UK Pull Signal Confirm Extract: Java Load failed" ec_team@test.com
mv $ukFile $ukDir/data/error/$ukFile.$timestamp
fi
java -XdoCloseWithReadPending -classpath .:UKtest.jaremandSchedule20.jar:$JDBC_PATH/classes111.zip hmi.common.uk.PullSignalConfirmExtract $ukFile $prod 2>err.out >> $LOGFILE
if [ $? = 0 ]
then
if [[ -s $ukFile ]]
then
. ukPricing_ftp.sh $ukServer $ukUser $ukPassword $ukFile mysign/$ukFile
grep -q '226 Transfer complete.' ftp.log
if [ $? -ne 0 ]
then
cat ftp.log | mailx -s " UK Pull Signal Confirm Extract: ftp to UK failed" ec_team@test.com
mv $ukFile $ukDir/data/error/$ukFile.$timestamp
else
mv $ukFile $ukDir/data/log/$ukFile.$timestamp
fi
else
echo "Nothing to extract. File has no data."
rm -f $ukFile
fi
else
cat err.out | mailx -s " UK Pull Signal Confirm Extract: Java Load failed" ec_team@test.com
mv $ukFile $ukDir/data/error/$ukFile.$timestamp
fi