Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


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

init.d scripts



On Mon, 2006-01-30 at 10:52 -0500, Tom Metro wrote:
> David Kramer wrote:
> > My problem is I am setting up to run a PHP script, so the command needs to be
> > "php myscriptname.php foo bar"...
> 
> Use a shebang line.
> 
> myscriptname.php:
> #!/path/to/php

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.

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





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org