Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!think!ames!ucbcad!ucbvax!cartan!brahms.Berkeley.EDU!ballou From: ballou@brahms.Berkeley.EDU (Kenneth R. Ballou) Newsgroups: comp.unix.wizards Subject: Re: Expressions in csh IF commands Message-ID: <801@cartan.Berkeley.EDU> Date: Fri, 23-Jan-87 03:06:07 EST Article-I.D.: cartan.801 Posted: Fri Jan 23 03:06:07 1987 Date-Received: Fri, 23-Jan-87 22:34:29 EST References: <15@aber-cs.UUCP> Sender: news@cartan.Berkeley.EDU Reply-To: ballou@brahms.Berkeley.EDU (Kenneth R. Ballou) Distribution: comp Organization: Math Dept. UC Berkeley Lines: 20 In article <15@aber-cs.UUCP> dap@aber-cs.UUCP (Dave Price) writes: >Can someone please tell me what is wrong with the following >apparently faulty IF in csh. > > if ( \{ /bin/true \} ) echo "hello" > >man csh expression description paragraph says you >can use commands in {} however all the above >produces is IF syntax error..... The correct syntax is if { /bin/true } echo "hello" The parentheses are unnecessary. -------- Kenneth R. Ballou ARPA: ballou@brahms.berkeley.edu Department of Mathematics UUCP: ...!ucbvax!brahms!ballou University of California Berkeley, California 94720