{ and } with for in /bin/sh
David Elliott
dce at smsc.sony.com
Tue Mar 27 05:34:33 AEST 1990
In article <12430 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>In article <237 at sherpa.UUCP> rac at sherpa.UUCP (Roger Cornelius) writes:
>-I recently came across some sh code which uses { and } instead of
>-do ... done in a for loop.
>
>It IS documented. So far as I can tell it's supported by all Bourne
>shells.
It's also documented that { and } work with case, though I haven't
gotten into that habit yet (I've used it with for loops for about
6 years).
The question I have is why it doesn't also work with while, until,
and if/then/else? Maybe people wouldn't think of sh as "the Algol
shell" if it were consistent on this point. ;-)
--
David Elliott
dce at smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
Help!!! The Easter Bunny is after me!!!
More information about the Comp.unix.questions
mailing list