Bug 144883 - Csh prints strange text to shell when I start it.
Summary: Csh prints strange text to shell when I start it.
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: tcsh   
(Show other bugs)
Version: 3.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact: Bill Huang
Depends On:
TreeView+ depends on / blocked
Reported: 2005-01-12 14:21 UTC by Klas Pettersson
Modified: 2007-11-30 22:07 UTC (History)
0 users

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

Attachments (Terms of Use)

Description Klas Pettersson 2005-01-12 14:21:01 UTC
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 13:33:35 UTC
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 13:39:52 UTC
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 16:35:34 UTC
(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 07:21:04 UTC
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 11:33:06 UTC
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 12:23:11 UTC
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 12:34:30 UTC
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.