Problems with csh

Carl Boberg Carl.Boberg at nrm.se
Wed Aug 2 13:11:02 UTC 2006


Sorry linebreaks dissapperared.. 

> Er,
> 
> When run with -e I get no output and when I echo $status I 
> get null 
[root at mail ~]# csh -e test 
[root at mail ~]# echo $status

[root at mail ~]#
> 
> Without -e
> [root at mail ~]# csh test
> 0
> DFK
> 0
> [root at mail ~]#
> 
> Hmm...
> 
> / C
> 
> > 
> > Hi,
> > 
> > I get result 0 on my RH9/FC4/RHEL3/RHEL4 boxes ... 
> > So I guess it could be local to your install.
> > 
> > / Carl
> > 
> > > -----Original Message-----
> > > From: redhat-sysadmin-list-bounces at redhat.com
> > > [mailto:redhat-sysadmin-list-bounces at redhat.com] On 
> Behalf Of Mark 
> > > Waterhouse
> > > Sent: den 26 juli 2006 13:22
> > > To: redhat-sysadmin-list at redhat.com
> > > Subject: Re: Problems with csh
> > > 
> > > Has anyone got any thoughts on this problem?
> > > 
> > > ----- Original Message -----
> > > From: "Mark Waterhouse" <mark at dfk-systems.com>
> > > To: <redhat-sysadmin-list at redhat.com>
> > > 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
> > > 
> > > --
> > > redhat-sysadmin-list mailing list
> > > redhat-sysadmin-list at redhat.com
> > > https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
> > > 
> > 
> > --
> > redhat-sysadmin-list mailing list
> > redhat-sysadmin-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
> > 
> 
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
> 




More information about the redhat-sysadmin-list mailing list