Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a problem with a shell script, which looks like:

#!/bin/csh -f
setenv Test

The problem is that it worked until I installed Ubuntu 12.04.
The respond tells me that the command setenv is not found.

My idea is that the bash does not change to the csh but how can I fix it?

share|improve this question

1 Answer 1

This happens because the line

#!/bin/csh -f

is not the very first line in your script file. If it is the first line, then please post the exact error message that is being printed in terminal when you execute the script.

Please verify also that csh/tcsh is actually installed. You can do this by typing the following into terminal:

dpkg -l | grep csh

If this command produces no output at all, then you can install tcsh by entering following command:

sudo apt-get install tcsh
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.