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

Re: Stupid shebang tricks

Ben Finney <ben@benfinney.id.au> wrote:

> Is '/usr/bin/env' part of the POSIX spec? Is its behaviour with regard
> to command arguments defined? Where would I find out?

It is part of POSIX:


The problem is not with env, but with shebang lines. I believe that

  #! program argument

works on most systems but using more arguments only works on some of
them. Therefore, even without env, you wouldn't be able to call perl in
a shebang line with more arguments than -w in a portable way.


Reply to: