Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!lvc From: lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) Newsgroups: comp.unix.questions Subject: Re: what's the use of "{ list }" in /bin/sh? Summary: while can contain compound commands in test Message-ID: <17103@tut.cis.ohio-state.edu> Date: 7 Jul 88 00:34:35 GMT References: <23590@teknowledge-vaxc.ARPA> <3305@palo-alto.DEC.COM> <12334@mimsy.UUCP> Organization: Ohio State Computer & Info Science Lines: 31 In article <12334@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: > In article <3305@palo-alto.DEC.COM> vixie@palo-alto.DEC.COM (Paul Vixie) ... > Actually, it has one more use: > > while { setup; test } do ... > > or any other place where a compound statement is needed and only > a single statement is allowed. (while and until are about it!) You could write: while command1 command2 ... commandn do ... done This works in the BSD /bin/sh. I guess this syntax must have been there all along. This is an obscure corner of sh/ksh syntax; I was not aware of it until I reviewed the ksh book by Korn and Bolsky. > In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) -- Larry Cipriani, AT&T Network Systems and Ohio State University Domain: lvc@tut.cis.ohio-state.edu Path: ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!lvc (strange but true)