csh pleasures

Neil Rickert rickert at mp.cs.niu.edu
Fri Feb 8 05:40:51 AEST 1991


In article <10880 at pasteur.Berkeley.EDU> tve at sprite.berkeley.edu (Thorsten von Eicken) writes:
>Question: what does the following c-shell script print out?
>Anybody care defending?
>
>	#!/bin/csh -f
>	set a=0
>	set b=1
>	if($a) then
>...
 csh is rather fussy when it parses its input.  Try: if ( $a ) then 

In particular, "if(" is well known to cause problems.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert at cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940



More information about the Comp.unix.wizards mailing list