bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ill positioned 'until' keyword


From: Bob Proulx
Subject: Re: Ill positioned 'until' keyword
Date: Wed, 14 Dec 2011 18:03:48 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

Peng Yu wrote:
> I looks a little wired why 'until' is the way it is now.
> ...
> until test-commands; do consequent-commands; done
> while ! test-commands; do consequent-commands; done

In the original Bourne shell there is no '!' operator.  The 'until'
was a way to negate the expression without using a '!' which didn't
exist in that shell.  An 'if' could operate using the 'else' clause.
But there wasn't any other way to do it in a while loop.  The addition
of '!' to the language was one of the best features.  IMNHO.  I use it
all of the time now.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]