From: Scheming Commie Date: 2006-08-02T12:15:10+09:00 Subject: How to auto-locate interpreter image 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.