-   Linux - Newbie (
-   -   /bin/csh: bad interpreter (

KDel 04-27-2004 08:24 AM

/bin/csh: bad interpreter
i'm working with a program(a network simulator) on a machine that has winlinux installed with kde. The machine is not mine,and the installation was already made when i started working.
When i'm trying to run a simulator script i'm getting "/bin/csh: bad interpreter: No such file or directory".

I understand that this error message doesnt have to do with this particular software,but something critical is missing from the system.I've searched at the package manager but i didnt find any related packages.

can you help me?

hw-tph 04-27-2004 11:24 AM

That's a common error when you try to run a script which requires an interpreter or shell that doesn't exist. If you open the file you will probably see that the first line is something like this:

This line tells the system that this is a cshell script, or more exactly - the program that the script should be interpreted with is /bin/csh. The most common shells on Linux are bash (/bin/bash) and the Bourne shell (/bin/sh). Other interpreters include perl and python, but those are not regular user shells but rather dedicated programming languages.

In order to get it working you need to install csh.


KDel 04-27-2004 01:09 PM

thx a lot hw-tph
can you tell me how shall i install it?i told you that i searched at the available packages and could it find it.
where can i download it?
if i change the code to #!/bin/bash will it work?

KDel 04-27-2004 05:45 PM

come on,i know that experienced users can answer this,it isn't that complex.
help me plz

AutOPSY 04-27-2004 08:07 PM

yes change it to a shell thats available on the system.

#!/bin/sh works almost anytime.
But then you will need to change the script to use sh's commands not the C shells commands.
Also, you can find the package if you look.
On a Redhat Sytem its something like,

[jasper@lanhost jasper]$ rpm -qa |grep csh
tcsh-6.12-4 <------------------------------Thats the package.
[jasper@lanhost jasper]$

hw-tph 04-28-2004 05:34 AM

I think most distributions come with csh (but perhaps not installed by default) so look around on your CD's, your distribution's FTP server or use if you use Redhat/Mandrake.


All times are GMT -5. The time now is 09:27 AM.