[NTLUG:Discuss] for loop - bash scripting..

Richard Geoffrion ntlug at rain4us.net
Tue Dec 6 15:37:29 CST 2005


how do you end an $INSTANCE in a for/loop without killing the entire loop?

-------------
for INSTANCE in *.csv ; do
    if [ ! "$NAME" -a "EMAIL" ] ; then
        echo  This record is not valid, ending  the parsing process of 
this file.
        ;exit 65 
        done  #even if this done is inside an succesful test condition, 
bash still sees it as a done.
    fi

    #rest of the .csv file parsing that requires ALL the parameters


done
-------------
   
-- 
Richard




More information about the Discuss mailing list