what's the use of "{ list }" in /bin/sh?
Timothy Reed
txr98 at wash08.UUCP
Fri Jul 8 07:33:31 AEST 1988
In article <6954 at sigi.Colorado.EDU> wu at spot.Colorado.EDU (WU SHI-KUEI) writes:
>In article <23590 at teknowledge-vaxc.ARPA> mkhaw at 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
More information about the Comp.unix.questions
mailing list