Re: Ill positioned 'until' keyword

2011-12-15 Thread Andreas Schwab
Bob Proulx writes: > 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

Re: Ill positioned 'until' keyword

2011-12-14 Thread Bob Proulx
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 u

Re: Ill positioned 'until' keyword

2011-12-14 Thread Dan Douglas
On Wednesday, December 14, 2011 05:47:24 PM Peng Yu wrote: > Hi, > > I looks a little wired why 'until' is the way it is now. According to > the manual until is before the do-done block. > > until test-commands; do consequent-commands; done > > A common design of until in other language is that

Ill positioned 'until' keyword

2011-12-14 Thread Peng Yu
Hi, I looks a little wired why 'until' is the way it is now. According to the manual until is before the do-done block. until test-commands; do consequent-commands; done A common design of until in other language is that it allows the loop body be executed at least once and test the condition at