Re: Shell Scripts
Thanks very much for the response.
In the script, I'm using
source ~/.cshrc
I've also written the script so that it doesn't need my set of aliases.
However, it simply does not ls the same way as tcsh or csh.
I can run bash scripts from within tcsh by placing
#!/bin/bash
at the top of the script. Why doesn't the same thing seem to work for
tcsh within tcsh?
Art Edwards
On Sun, Apr 24, 2005 at 05:48:50PM -0400, Roberto C. Sanchez wrote:
> Art Edwards 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
> >
> >However, the shell seems to be running in the bourne shell (sh). I say
> >this because I can't get the shell to source my .cshrc file and the ls
> >command gives the same result as I get inside sh.
> >
> >What am I doing wrong?
> >
>
> I don't know about tcsh, but (according to the man page) bash
> only executes ~/.bashrc for interactive non-login shells. You
> might want to try adding a ". ~/cshrc" or the tcsh equivalent
> to source the file.
>
> -Roberto
>
> --
> Roberto C. Sanchez
> http://familiasanchez.net/~sanchezr
Reply to: