Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!agate!woodstock.berkeley.edu!smoot From: smoot@woodstock.berkeley.edu (Stephen [Steve] R Smoot) Newsgroups: comp.unix.shell Subject: else in csh Message-ID: <1991May24.025031.18193@agate.berkeley.edu> Date: 24 May 91 02:50:31 GMT Article-I.D.: agate.1991May24.025031.18193 Sender: root@agate.berkeley.edu (Charlie Root) Reply-To: smoot@cs.berkeley.edu Organization: UC Berkeley Lines: 15 Can someone explain to me why the following is valid in csh? It seems invalid according to the man page (though treating the commands listing as a formal grammar is going a tad far, I know), but runs without error: ------------------------------------------------------------------------------- #!/bin/csh -f else echo "No, I dont get printed, never get executed" endif ------------------------------------------------------------------------------- It makes invalid nested if statements easier to write than most languages... -s