How to write a condition in Bourne shell

Tino Engel elrap at web.de
Mon Nov 5 12:15:43 PST 2007


while [ $? -ne 0 -a $retry -gt 0 ]
do
   ...
done

should do the work 

Am Montag 05 November 2007 07:03 schrieb Olivier Nicole:
> 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?
>
> TIA,
>
> Olivier
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20071105/d75a5de6/attachment.pgp


More information about the freebsd-questions mailing list