From ivm@hppc Mon Mar  8 17:58:25 1999
Date: Mon, 30 Nov 1998 09:49:53 -0600
From: Igor Mandrichenko <ivm@hppc>
To: Heidi Schellman <schellma>, Art Kreymer <kreymer@fnal.gov>
Cc: run2farms@fnal.gov, linux-users@fnal.gov
Subject: Re: running shell scripts properly

On Nov 28,  8:48am, Heidi Schellman wrote:
> Subject: Re: running shell scripts properly
> Thanks Art, your suggestion helped.  Putting  #!/usr/bin/env csh instead
> of #!/usr/local/bin csh at the top of my scripts cured them.  I guess the
> 'problem' is with novice users, emacs and the fnal red-hat install.  creation
> of X.csh via emacs X.csh puts /usr/local/bin csh at the top of files by
> default.  But there is no /usr/local/bin csh on FNAL linux.
>
> Those like me who can never remember what to put at the top of a script rely
> on emacs to do it for us. I guess the way to idiot-proof this is either to
fix
> emacs, disable the feature in emacs or put /usr/local/bin csh into the fnal
> Red-Hat so that it mirrors the behavior on other FNAL machines.

I'd vote for "disable the feature in emacs" and putting "#!/bin/csh"
at the top of your scripts.

Igor



-- 
Igor Mandrichenko
Computing Division
Fermi National Accelerator Laboratory
E-mail: ivm@fnal.gov

From ivm@hppc Mon Mar  8 17:58:52 1999
Date: Mon, 30 Nov 1998 09:55:51 -0600
From: Igor Mandrichenko <ivm@hppc>
To: Art Kreymer <kreymer@fnal.gov>, Heidi Schellman <schellma>
Cc: run2farms@fnal.gov
Subject: Re: running shell scripts instead of c++ executables.

On Nov 27, 11:58pm, Art Kreymer wrote:
> Subject: Re: running shell scripts instead of c++ executables.
> We're having no problem running all sorts of scripts on fnpcc.
> All the installation and maintenance scripts, including really ugly
> ones like setcompiler, work fine.
>
> What is your script's header line ?
> Perhaps you're asking for a particular shell like /usr/local/bin/csh
> which may not be on this system.
>
> You can make such things more portable by using something like
>     #!/usr/bin/env csh
> which will pick up csh out of your current path.

I would not recommend using "#!/usr/bin/env csh" as interpreter line
in your scripts. The reason is that in order to work, "env" requires
that PATH is defined and includes the directory where csh is.

In FBS environment, it is not guaranteed that PATH will be defined
in such a way or will be defined at all.

I'd suggest using "#!/bin/csh" in your scripts in FBS environment.

Igor


-- 
Igor Mandrichenko
Computing Division
Fermi National Accelerator Laboratory
E-mail: ivm@fnal.gov

