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

Re: Shell Scripts



On Sun, Apr 24, 2005 at 05:45:28PM -0400, Gregory Seidman wrote:
> On Sun, Apr 24, 2005 at 02:30:19PM -0600, 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?
> 
> The first thing you are doing wrong is attempting to script in csh (or
> tcsh). Please use Google to find "csh considered harmful" and read it.

While I do agree that scripting in csh/tcsh is horrid compared to
bash/pdksh/ksh/sh, I don't think the "harmful" diagnosis is quite correct.
Suboptimal, yes. Counterintuitive, most definetly. Harmful implies that it
actually causes harm, which it doesn't, unless you count the bruise you get
from banging your head on your desk trying to get {,t}csh to do what you
want.



Reply to: