From: Ara.T.Howard@... Date: 2004-10-05T23:14:53+09:00 Subject: Re: env question On Tue, 5 Oct 2004, Robert Klemme wrote: > Personally I don't understand why pople use the "#!/usr/bin/env ruby" idiom > anyway. AFAIK using the real path to the ruby interpreter is a) more > efficient and b) more secure. So why use env? Did I miss something? many of my scripts are run from 30-40 machines. some of the machines mount a central nfs server on which i've installed ruby and all required packages for my software. however, as an optimization and to improve nfs failure tolerance many of our machine cache a lot of software (including ruby) and data files further up the path than the nfs ruby. finally, a third class of machines has the system ruby only (1.6.8). if i write a script and use #!/usr/bin/env ruby the system finds the 'right' ruby at run time. without this i'd have to maintain many copies of my scripts. this problem extends to the situation where i give you a ruby script and don't know where your ruby is, and to upgrading ruby (i have 1.8.1 before 1.8.2 in our group path because i'm migrating to 1.8.2, but reverse this for testing). env helps with all of this and, yes, it's probably less secure - but so is anything that involves getting alot of work done quickly ;-) -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it. | --Dogen ===============================================================================