Error for "continue" keyword in Linux script.

Hi All

I have a function in a linux script like this

clean_up()
{
        db2 -x "UPDATE ${DB_SCHEMA_NAME}.ETL_DAILY SET ETL_STATUS = 'SUCCESSFUL' WHERE PROCESS_DATE = '${INT_RUN_DATE}' AND BATCH_NO = ${CM_BATCH} AND APP_ID = ${APP_ID} AND APP_VERSION = '${APP_VERSION}'" > ${TMPOUT}
        [ `grep SQLSTATE ${TMPOUT} | wc -l` -gt 0 ] && echo `date`": Failed:       ${DB_SCHEMA_NAME}.ETL_DAILY: UPDATE failed" && fclean_up "${DB_SCHEMA_NAME}.ETL_DAILY: UPDATE failed" && return 0
        echo `date`": Info:         `basename $0`: Completed Successfully !" && echo `date`": Info:         `basename $0`: Completed Successfully !" >> ${EXECUTION_LOG}
        [ -f $CM_dsload_prog_ind ] && rm $CM_dsload_prog_ind || continue
        [ -f $DIMJOBLST ] && rm $DIMJOBLST || continue
        [ -f $DIMJOBLST_COMMON ] && rm $DIMJOBLST_COMMON || continue
        [ -f $DIMJOBLST_ENABLED ] && rm $DIMJOBLST_ENABLED || continue
}

But at this function its throwing an error like this

  continue: only meaningful in a `for', `while', or `until' loop

Could you all please help me why this error is occuring and what would be the impact if i remove the continue keywords from this functions.

Thanks

The error message says it all. Condition testing is not looping. Continue or break can be used only in loops. There will be no impact if you remove continue. Its superfluous and will only throw exceptions like what you saw.

Can someone please help me on this.

This should work, though untested:

 clean_up()
{
        db2 -x "UPDATE ${DB_SCHEMA_NAME}.ETL_DAILY SET ETL_STATUS = 'SUCCESSFUL' WHERE PROCESS_DATE = '${INT_RUN_DATE}' AND BATCH_NO = ${CM_BATCH} AND APP_ID = ${APP_ID} AND APP_VERSION = '${APP_VERSION}'" > ${TMPOUT}
        [ `grep SQLSTATE ${TMPOUT} | wc -l` -gt 0 ] && echo `date`": Failed:       ${DB_SCHEMA_NAME}.ETL_DAILY: UPDATE failed" && fclean_up "${DB_SCHEMA_NAME}.ETL_DAILY: UPDATE failed" && return 0
        echo `date`": Info:         `basename $0`: Completed Successfully !" && echo `date`": Info:         `basename $0`: Completed Successfully !" >> ${EXECUTION_LOG}
        [ -f $CM_dsload_prog_ind ] && rm $CM_dsload_prog_ind
        [ -f $DIMJOBLST ] && rm $DIMJOBLST
        [ -f $DIMJOBLST_COMMON ] && rm $DIMJOBLST_COMMON
        [ -f $DIMJOBLST_ENABLED ] && rm $DIMJOBLST_ENABLED
}