Shell Scripting Question
hey,
Say i'm doing a loop in which I ask someone a question ...
for $fruit in `cat /usr/fruits.txt` ;
do
echo -n "Do you like $fruit"
read ANS
if [ -z $ANS ] ; then
# NEED HELP WITH CODE HERE
fi
done
how can I be able to have loop repeat itself at the same iteration when the
"if -z" statement turns out to be ture??
I know that continue can be used to do this, however from my understanding
you need to tell it at which iteration you want to start at. Is there a
dynamic way of doing this or something??
thanks so much for any info you can give.
Sunny Dubey
Reply to: