From: Michal Suchanek Date: 2006-08-09T08:15:22+09:00 Subject: Re: How to auto-locate interpreter image On 8/2/06, Scheming Commie wrote: > On Sat, 15 Jul 2006 21:06:25 +0000, Just Another Victim of the Ambient > Morality wrote: > > I'm pretty sure the "#!" line is meaningless on Windows and the shell > > doesn't even bother looking for it. Indeed, it always struck me a little > > weird that every script knows exactly where the interpreter image is. What > > if it were to move? All your scripts will suddenly break! An annoying, > > albeit, unlikely scenario... > > #!/usr/bin/env perl > #!/usr/bin/env ruby > .. etc > > env finds the interpreter wherever it is and runs it, as you'd expect. > > A neat trick, I don't know why it isn't used, well, universally. > > Of course it relies on env being in /usr/bin but, that changes less > (never) than where particular interpreters are. however, on some platforms /usr/bin/env is broken. Not to mention the occasions when there are several interpreters installed. Thanks Michal