I have the below script that uses 2 for loops. for some reason they loop is not looping ! /bin/ksh CURR_PATH='/main/nedcor/flexcube' cd $CURR_PATH for DIR1 in 'WIP' 'INPUT';do echo $DIR1 for DIR in $(find . -name $DIR1);do RESULT=`ls -A $DIR | egrep -v "BKUP|BKP"` echo $DIR echo $RESULT echo $RESULT1 if [ -z "$RESULT" ] ; then echo "No Files found" exit 0 else echo file $RESULT found exit 1 fi done done
![]() |
0 |
![]() |
Nicholas Namacha <nnamacha@gmail.com> wrote: >I have the below script that uses 2 for loops. for some reason they loop is not looping The 'if' contains 'exit' in both paths so the script terminates there.
![]() |
0 |
![]() |