bug-coreutils
[Top][All Lists]
Advanced

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

Re: env (GNU coreutils) 5.93 patch


From: Eric Blake
Subject: Re: env (GNU coreutils) 5.93 patch
Date: Fri, 30 Dec 2005 19:31:05 +0000

[The bug-sh-utils list is obsolete, use bug-coreutils instead]

From: Shigeru Makino
> Hello,
> 
> Your “env(1) command is very useful for multi-plat home user.
> 
> 
> but I try to same technique for awk script, and get err !
> 
> #! /usr/bin/env awk -f

Traditional systems that parse #! lines can only give a single
argument to the interpreter being invoked.  This is not a
feature of env, but of the operating system.  That explains why
env is getting "awk -f" as a single argument.  Unfortunately,
POSIX prohibits env from performing whitespace word
splitting on its arguments, so while the effort of your patch
is appreciated, it probably will not be applied.  See the
POSIX requirements on env here:

http://www.opengroup.org/onlinepubs/009695399/utilities/env.html

When using /usr/bin/env as the interpreter in a #! line, you must
be sure that there is only one more word on the line, which means
that you cannot use env to invoke another program while still
providing arguments to that program.

--
Eric Blake




reply via email to

[Prev in Thread] Current Thread [Next in Thread]