[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Shell Scripts



In article <[🔎] ceb0ad0050424180969614730@mail.gmail.com>,
Michael Marsh  <michael.a.marsh@gmail.com> wrote:
>On 4/24/05, Art Edwards <edwardsa@icantbelieveimdoingthis.com> wrote:
>> I'm trying to run a shell script with tcsh (my default shell is tcsh).
>> My first line of the script is
>> 
>> #!/bin/tcsh
>
>The system can't find /bin/tcsh, so it's defaulting to bash.  The
>correct path should be /usr/bin/tcsh .

Ehm no, not true at all.

$ which tcsh
/bin/tcsh

Besides, the system doesn't just default to some random shell.
If you put #!/never/never/land at the top, the system says:

$ bash -c ./foo
bash: ./foo: /never/never/land: bad interpreter: No such file or directory
$ tcsh -c ./foo
./foo: Command not found.
$ csh -c ./foo
./foo: Command not found.

Mike.



Reply to: