[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 _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
