Bug 144883 - Csh prints strange text to shell when I start it.
Csh prints strange text to shell when I start it.
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: tcsh (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Miloslav Trmač
Bill Huang
Depends On:
  Show dependency treegraph
Reported: 2005-01-12 09:21 EST by Klas Pettersson
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-17 07:34:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Klas Pettersson 2005-01-12 09:21:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET 
CLR 1.0.3705)

Description of problem:
When I either start a new shell from the kicker or by typing csh (not 
any other shell) in a command window the following text is printed:

[: Command not found.
test: Command not found.
test: Command not found.
test: Command not found.
test: Command not found.
test: Command not found.
test: Command not found.
1 gardel@r2pgardel ~>

I have tried to see if it depends on the .cshrc script in the users 
home directory or the /opt/local/.cshrc but the same text appears 
when I remove them. This has not been a problem before. It has just 
occured I can´t seem figure it out...

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Not applicable

Actual Results:  Strange text is printed to the shell

Expected Results:  No text should be printed...

Additional info:
Comment 1 Klas Pettersson 2005-01-13 08:33:35 EST
I have located the problem. Some of the commands can´t be found by 
the script. It tries to source the /etc/profile.d/colorls.csh file 
wich contains several "test" command. This is why it returns "test: 
command not found" The test command works in all other shells but not 
Csh! It´s the same with the vmstat and some other commands. I can´t 
figure out why it is so...
Comment 2 Klas Pettersson 2005-01-13 08:39:52 EST
The which command in csh returns:
[gardel@r2pgardel gardel]# which test
test: Command not found.

And in bash:
bash-2.05b$ which test
which: no test in 
But it works when used...
Comment 3 Miloslav Trmač 2005-01-13 11:35:34 EST
(test) and ([) are sh builtins, that's why they work in bash even
though the executable is not found.

The real problem is likely that the standalone test and [ executables
are missing or not executable. They should be in /usr/bin, provided
by the coreutils package.

Please paste the output of (ls -l /usr/bin/test /usr/bin/[) and
attach the output of (rpm -q coreutils; rpm -V coreutils).
For completeness, please include also the output of (echo $path)
in csh.

Comment 4 Klas Pettersson 2005-01-17 02:21:04 EST
6 gardel@r2pgardel ~> ls -l /usr/bin/test /usr/bin/[
ls: /usr/bin/test: File or directory does not exist
lrwxr-xr-x    1 root     wheel           4  3 aug 23.26 /usr/bin/[ -> 

7 gardel@r2pgardel ~> rpm -q coreutils; rpm -V coreutils
.......T c /etc/profile.d/colorls.csh
missing     /usr/bin/test

8 gardel@r2pgardel ~> echo $path
/export/home/gardel/gardelbin/exe /usr/local/bin /usr/bin /export/home
/gardel/gada_cp/script /export/home/gardel/sne /opt/absoft/bin /usr/lo
cal/sbin /usr/sbin /sbin /opt/local/bin/ /export/home/gardel/gardelbin
/exe /usr/local/bin /usr/bin /usr/local/lf9562/bin /export/home/gardel
/gardelbin/exe /usr/local/bin /usr/bin /export/home/gardel/gada_cp/scr
ipt /export/home/gardel/sne /opt/absoft/bin /usr/local/sbin /usr/sbin 
/sbin /opt/local/bin/ /export/home/gardel/gardelbin/exe /usr/local/bin
 /usr/bin /usr/local/lf9562/bin /usr/kerberos/bin /usr/local/bin /bin 
/usr/bin /usr/X11R6/bin . /export/home/gardel/gardel /export/home/gard
el/gardel/bin /export/home/gardel/gardel/bin . /export/home/gardel/gar
del /export/home/gardel/gardel/bin /export/home/gardel/gardel/bin

The strange thing is that we´ve had some troubles with the csh losing 
it´s enviroment variables from time to time. The "test" error just 
occurred. I´ve also had problems with a disapearing vmstat command. 
I´ve haven´t deleted any /usr/bin files manually though...
Comment 5 Miloslav Trmač 2005-01-17 06:33:06 EST
OK, that confirms my hypothesis (nevertheless the output is
still quite strange - /usr/bin/[ should be owned by group "root",
not "wheel".)

Please try reinstalling the coreutils package using
(rpm -Uvh --replacepkgs PATH/TO/coreutils-4.5.3-26.i386.rpm)
Comment 6 Klas Pettersson 2005-01-17 07:23:11 EST
It worked nicely! I still can´t figure out why it disapeared in the 
first place. The only thing I can relate to is that we had some 
troubles with frequent system Oops before we upgraded to the latest 
kernel. My most unqualified is that we had some memory overflow or 
something... Can that be the source of the problem? The "Oops" 
problems seems to have disapeared after the kernel upgrade.
Comment 7 Miloslav Trmač 2005-01-17 07:34:30 EST
Unfortunately I have no idea; the best I can come up with
is "some kind of filesystem corruption", which could happen
quite easily if the kernel is oopsing.

Marking as resolved, please report a bug against the kernel
if you encounter further filesystem issues.

Note You need to log in before you can comment on or make changes to this bug.