Path: utzoo!attcan!utgpu!utstat!jarvis.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!mcvax!ukc!axion!iwarner From: iwarner@zaphod.axion.bt.co.uk (Ivan Warner,G44 SSTF,6632,) Newsgroups: comp.unix.questions Subject: Re: csh question Message-ID: <1651@zaphod.axion.bt.co.uk> Date: 24 May 89 09:36:26 GMT References: <19712@adm.BRL.MIL> Sender: news@axion.bt.co.uk Reply-To: iwarner@zaphod.axion.bt.co.uk Lines: 60 From article <19712@adm.BRL.MIL>, by nodak.edu>@adm.BRL.MIL: > > A friend of mine was playing with our version of the csh on a (mostly) > Sys V.2 lookalike system, when the following sequence occured: > > % set ab = (spi kev ish ere) > % echo $ab[1] > spi > % alias test ' foreach x (1 2 3) \ > echo $ab[$x] \ > end ' > % test > ? ? > DISCONNECTED from 04/118 > > Are we doing something incredibly stupid here ? Or do we have a brain damaged > version of csh ? We're running sx1100 2R1 on an sperry 1100/91 mainframe with > a binary only license. > If its any consolation, the Ultrix V3.0 version of csh did the same - it output "? ?", and then logged me out. Run from within a shell script, it does not log me out, but it doesn't do what it should. Running the shell script: set ab = (spi kev ish ere) echo $ab[1] alias test ' foreach x (1 2 3) \ echo $ab[$x] \ end ' alias test echo '--------------------------' sleep 5 test using the command "csh -x cshtest" gives the output: set ab = ( spi kev ish ere ) echo spi spi alias test foreach x (1 2 3) echo $ab[$x] end alias test foreach x (1 2 3) echo $ab[$x] end echo -------------------------- -------------------------- sleep 5 foreach x ( 1 2 3 ) i.e. the script dies at the "foreach" command, but with no error message. Must be a bug in csh.