1831554 Members
3915 Online
110025 Solutions
New Discussion

which error?

 
SOLVED
Go to solution
discoverer
Frequent Advisor

which error?

Hi All friends,

I met an error of 'which' on a HP W/S:
# which cc
then: then/endif not found.

Can any master-hand tell me how to solve it?

Thanks in advance!

Listener
Listen, then discover, then succeed!
6 REPLIES 6
Robin Wakefield
Honored Contributor

Re: which error?

Sounds like /usr/bin/which is corrupt. Have you another w/s from which you can copy a clean version?

Robin
Shahul
Esteemed Contributor

Re: which error?


Hi

Ur `which` is working with some other file

#which sh . Is it giving exact output ?

If yes ur which command is ok.
Normally cc used to be there in /usr/ccs/bin. there will be link in /usr/bin. So please checkup whether these directories are there in PATH.


shahul
Ravi_8
Honored Contributor

Re: which error?

Hi,
which x tells you where x resides
if not found mean, cc is not in your system
never give up
Robin Wakefield
Honored Contributor
Solution

Re: which error?

If which is failing for everything you are looking for, perhaps you have an invalid .cshrc file in your home directory, since /usr/bin/which runs as a csh script.

Robin.
discoverer
Frequent Advisor

Re: which error?

Hi All friends,

Thanks for you help!

It shows that Robin is right -- I wrote a lot of things in the .cshrc, and they lead to this error!

Thanks again,Robin.

Alan
Listen, then discover, then succeed!
discoverer
Frequent Advisor

Re: which error?

The reason in detail:
'which' sources (executing) the user's .cshrc to determine Both aliases and path.

I put if/then in my .cshrc, but without endif.
Listen, then discover, then succeed!