Path: utzoo!attcan!uunet!wash08!txr98
From: txr98@wash08.UUCP (Timothy Reed)
Newsgroups: comp.unix.questions
Subject: Re: what's the use of "{ list }" in /bin/sh?
Message-ID: <147@wash08.UUCP>
Date: 7 Jul 88 21:33:31 GMT
References: <23590@teknowledge-vaxc.ARPA> <6954@sigi.Colorado.EDU>
Reply-To: txr98@wash08.UUCP (Timothy Reed)
Organization: American Chemical Society, Washington, DC
Lines: 20

In article <6954@sigi.Colorado.EDU> wu@spot.Colorado.EDU (WU SHI-KUEI) writes:
>In article <23590@teknowledge-vaxc.ARPA> mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) writes:
>>
>>Under what circumstances is this useful (i.e., why whould one want to
>>put braces around a list of commands)?
>
>[ -r "$filename" ] || { echo "Cannot open $filename for reading" ; exit 1 }
>is another way of writing

Is "[ -r "$filename" ] || { echo "error" ; exit 1 }" faster than
"if [ -r filename ] ; then echo "error" ; exit ; fi" ???

Thanks!
~
~
~
~
~
~
"/Timothy/Reed/American/Chemical/Society" 29 lines, 924 characters