init.d scripts

Ed Hill ed at eh3.com
Mon Jan 30 11:42:58 EST 2006


On Mon, 2006-01-30 at 11:05 -0500, Josh ChaitinPollak wrote:
> On Jan 30, 2006, at 10:59 AM, Ed Hill wrote:
> > While the above will certainly work, its a good idea to develop the
> > habit of using "#!/usr/bin/env INTERPRETER_NAME" since 1) its  
> > maximally
> > portable and 2) it allows for easy run-time selection of different
> > installed versions.
> 
> Its maximally portable across Linux, but is not POSIX compliant. Then  
> again, I guess neither is php. Probably not a problem for what you  
> are working on, but keep it in mind.

Yes, I'm aware that POSIX stopped just short of standardizing it.  In
any case, its a very common trick and it works nicely on nearly all
"recent" versions of Solaris, Linux, HP-UX, AIX, etc.  In fact, you'll
have a difficult time finding a Unix or Linux OS released after 1999
that doesn't support that syntax.

And please don't submit some stripped-down embedded system as a counter
example.  I don't doubt their existence.  ;-)

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3 at mit.edu                ed at eh3.com
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464




More information about the Discuss mailing list