http://mail-index.netbsd.org/netbsd-users/2008/11/10/msg002390.html
Date: Sun, 9 Nov 2008 09:39:19 -0500
From: "matthew sporleder" <msporleder%gmail.com@localhost>
When the #! code was first written (by Dennis Ritchie, I was
told, though I never asked him about it) all it allowed was a
single path name to the interpreter - no extra args at all.
When I added it to BSD, I made a conscious decision to permit
exactly one arg - not a general command line. That avoided the
need for the kernel to contain an arg parser, or for any kind of
quoting mechanism (I decided that allowing spaces in the interpreter
path name was so unlikely to ever be required that we could just
ignore that possibility - and no-one I know has ever complained
about that one...).
Exactly one arg (or none) on the #! line remains the most common practice
I believe, though I have heard of systems that have extended it.
How they handle quoting issues I have no idea, I probably don't want
to find out.
For what it is worth, I think the practice of using env is just
laziness on the part of the developer of the script (not creating
a mechanism to fill in the correct interpreter path when installing
the script). It isn't needed with pkgsrc which does provide that
mechanism.
Considering i've probably been professionally programming since before you were born, used multics and most *nix variants, even serving on the AIX dev team in Kingston AND since i know it is not the fault of env, i do realize YOU are the "self-impressed phony without a name attempting to put me down" here.
see also
https://www.in-ulm.de/~mascheck/various/shebang/
and http://mail-index.netbsd.org/netbsd-users/2008/11/09/msg002388.html
The true solution to your problem is to create a script/program to initialize the proper environment that you expect and place that into a place that will be static across all systems. This is a solution used by all programmers that have worked in production shops as it is commonly REQUIRED for each application system delivered. I tend to place mine into /usr/bin, but on MVS they would exist in a proclib, and on VM/CMS on the application disk.
Edit:Ive been using Huck as a nickname on the net since the early 80's, first using Huck via HELPDESK@TAMVM1, before there was even a RELAY that IRC now uses as its middle name. It was given to me when i replaced Dave Berry as sound engineer on my HS stage crew, and i became Huck-TheNew-Berry when people came looking for him.
|