D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Shebang puzzle

 


On 26 Apr, 2012, at 1:56 pm, Simon Waters wrote:

On 26/04/12 13:32, Philip Hudson wrote:
#!/usr/bin/env tcsh -f

Why "#!/usr/bin/env tcsh -f" and not "#!/usr/bin/tcsh -f", or did you
already simplify it down to this case?

It's a bit boring, but since you ask:

The MacPorts FLOSS repo for OS X installs its binaries under /opt/ local/bin/, /opt/local/usr/bin/, etc etc, mutatis mutandum. Their versions of most things are more up-to-date than Darwin's, including bash, tcsh, screen, and emacs (my digital life), plus they provide the GNU versions of things like date, tar etc that work differently (usually better, but not always) to the BSD ones in Darwin and that crucially are expected by lots of scripts I download/copy. I try to make my scripts as platform-neutral as possible, so I prefer my scripts to use the MacPorts versions whenever possible on OS X, and 'env' lets me do this.

--
Phil Hudson                  http://hudson-it.no-ip.biz
@UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63


--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq