[Tutor] env shebang with options

Rick Pasotto rick at niof.net
Sun May 2 02:03:39 EDT 2004


On Sat, May 01, 2004 at 05:55:43PM +0200, Magnus Lyckå wrote:
> At 22:50 2004-04-29 -0700, Danny Yoo wrote:
> >Ok, after reading this a bit, I'm guessing that
> >
> >    #!/usr/bin/env python {options}
> >
> >might not be so portable, as the shebang feature seems to behave
> >subtly different between all the the Unices.
> 
> Yes, it seems that
> 
> #!/usr/bin/env python
> 
> and
> 
> #!/usr/bin/python -Ot
> 
> works, but not
> 
> #!/usr/bin/env python -Ot
> 
> in Linux.

I believe that's because '#!command' can take only *one* option string.
In the last case the command is '/usr/bin/env' and that option is
'python'. Anything after that is ignored.

-- 
"...in a stateless society there would be no regular, legalized channel for
 crime and aggression, no government apparatus the control of which provides
 a secure monopoly for invasion of person and property." -- Power and Market
    Rick Pasotto    rick at niof.net    http://www.niof.net



More information about the Tutor mailing list