Expressions in csh IF commands

Joseph S. D. Yao jsdy at hadron.UUCP
Fri Feb 6 13:18:40 AEST 1987


In article <801 at cartan.Berkeley.EDU> ballou at brahms.Berkeley.EDU (Kenneth R. Ballou) writes:
>In article <15 at aber-cs.UUCP> dap at aber-cs.UUCP (Dave Price) writes:
>>Can someone please tell me what is wrong with the following
>>	if ( \{ /bin/true \} ) echo "hello"
>The correct syntax is 
>	if { /bin/true } echo "hello"
>The parentheses are unnecessary.

Ken is, of course, correct, albeit nonresponsive.

The answer to the question is that the {}'s should not be
quoted.  The ()'s may be in or not at your option.

You'll need them if you add any and'ed or or'ed expressions.
-- 

	Joe Yao		hadron!jsdy at seismo.{CSS.GOV,ARPA,UUCP}
			jsdy at hadron.COM (not yet domainised)



More information about the Comp.unix.wizards mailing list