From mark at dfk-systems.com Wed Jul 12 16:09:21 2006 From: mark at dfk-systems.com (Mark Waterhouse) Date: Wed, 12 Jul 2006 17:09:21 +0100 Subject: Problems with csh References: <87F3365F468C0645BCF7B9BEDABDE01230FF81@cameurexb01.EUROPE.ROOT.PRI> Message-ID: <003601c6a5cd$9bb1fe50$0f0a650a@EUROPE.ROOT.PRI> Hi all A user on our campus has discovered a small bug within csh that I would like to share with the community; predominately to confirm if this is a bug and, if it, to see what you all think. My user is trying to capture the exit status of csh when running against a certain internal script. For the sake of completeness, I've created a very small script which does nothing but echo a string. The script, called 'test', looks like this; [sysadmin at ns02 ~]$ cat test echo $status echo DFK echo $status On each machine that I tested this on (Centos/FC3/FC1), I get an output of "1". On the FreeBSD, Solaris and SuSE boxes, I get the correct output. Do you think this is a bug? fwiw, I noticed that on the Centos/FCx/RHEL boxes, /bin/csh is symlinked to /bin/tcsh. Ah....except that the same is true for SuSE. Any ideas greatly appreciated. Thanks Mark Centos 3.6 [sysadmin at ns02 sysadmin]$ csh [sysadmin at ns02 ~]$ csh -e test [sysadmin at ns02 ~]$ echo $status 1 Fedora Core 3 [root at webhost ~]$ csh [root at webhost ~]$ csh -e test [root at webhost ~]$ echo $status 1 Fedora Core 1 [mark at secure mark]$ csh [mark at secure ~]# csh -e test [mark at secure ~]# echo $status 1 FreeBSD 5.4-STABLE > csh %csh -e test 0 DFK 0 %echo $status 0 Solaris 2.6 (5.6) # csh noo-noo# csh -e test 0 DFK 0 noo-noo# echo $status 0 SuSE Enterprise Server 9 (x86_64) octopus % 24 : csh octopus % 21 : csh -e test 0 DFK 0 octopus % 22 : echo $status 0 -- This message has been scanned for viruses and dangerous content by DFK Systems Limited, and is believed to be clean. To report this message as spam, please click on this link - https://secure.dfk-systems.com/quarantine/spam.php?id=k6CG9rRJ084385 From mark at dfk-systems.com Wed Jul 26 11:21:59 2006 From: mark at dfk-systems.com (Mark Waterhouse) Date: Wed, 26 Jul 2006 12:21:59 +0100 Subject: Problems with csh Message-ID: <004e01c6b0a5$b6381920$0f0a650a@EUROPE.ROOT.PRI> Has anyone got any thoughts on this problem? ----- Original Message ----- From: "Mark Waterhouse" To: Sent: Wednesday, July 12, 2006 5:09 PM Subject: Problems with csh > Hi all > > A user on our campus has discovered a small bug within csh that I would > like to share with the community; predominately to confirm if this is a > bug and, if it, to see what you all think. > > My user is trying to capture the exit status of csh when running against a > certain internal script. > For the sake of completeness, I've created a very small script which does > nothing but echo a string. > > The script, called 'test', looks like this; > [sysadmin at ns02 ~]$ cat test > echo $status > echo DFK > echo $status > > On each machine that I tested this on (Centos/FC3/FC1), I get an output of > "1". > On the FreeBSD, Solaris and SuSE boxes, I get the correct output. > > Do you think this is a bug? > fwiw, I noticed that on the Centos/FCx/RHEL boxes, /bin/csh is symlinked > to /bin/tcsh. Ah....except that the same is true for SuSE. > > Any ideas greatly appreciated. > > Thanks > Mark > > > > Centos 3.6 > [sysadmin at ns02 sysadmin]$ csh > [sysadmin at ns02 ~]$ csh -e test > [sysadmin at ns02 ~]$ echo $status > 1 > > Fedora Core 3 > [root at webhost ~]$ csh > [root at webhost ~]$ csh -e test > [root at webhost ~]$ echo $status > 1 > > Fedora Core 1 > [mark at secure mark]$ csh > [mark at secure ~]# csh -e test > [mark at secure ~]# echo $status > 1 > > FreeBSD 5.4-STABLE >> csh > %csh -e test > 0 > DFK > 0 > %echo $status > 0 > > Solaris 2.6 (5.6) > # csh > noo-noo# csh -e test > 0 > DFK > 0 > noo-noo# echo $status > 0 > > SuSE Enterprise Server 9 (x86_64) > octopus % 24 : csh > octopus % 21 : csh -e test > 0 > DFK > 0 > octopus % 22 : echo $status > 0 -- This message has been scanned for viruses and dangerous content by DFK Systems Limited, and is believed to be clean. To report this message as spam, please click on this link - https://secure.dfk-systems.com/quarantine/spam.php?id=k6QBM0OO069635