On 2007-11-05 14:03, Olivier Nicole <[EMAIL PROTECTED]> wrote: > Hi, > > I am a lame Bourne sheel programmer, how to write: > > while [ ( $? -ne 0 ) -a ( $retry -gt 0 ) ] ; do > > that should execute as long as $? is not null and $retry is greater > than 0?
Try something like... retry=0 done=-0 while [ $done -eq 0 ] && [ $retry -lt 10 ]; do run_some_other_stuff_here if [ $? -eq 0 ]; then done=1 fi done if [ $done -eq 0 ]; then echo "Failed after $retry attempts." fi _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"