[tex-live] how robustly call awk script?

Heiko Oberdiek oberdiek at uni-freiburg.de
Mon Jan 15 09:26:52 CET 2007


On Sun, Jan 14, 2007 at 09:42:54PM +0100, Martin Schröder wrote:

> 2007/1/14, Heiko Oberdiek <oberdiek at uni-freiburg.de>:
> >>From the bash manual page:
> >
> >|       If  the program is a file beginning with #!, the remainder
> >|       of the first line specifies an interpreter  for  the  pro­
> >|       gram.   The  shell  executes  the specified interpreter on
> >|       operating systems that do not handle this executable  for­
> >|       mat  themselves.  The arguments to the interpreter consist
> >|       of a single optional argument  following  the  interpreter
> >|       name  on  the  first  line of the program, followed by the
> >|       name of the program, followed by the command arguments, if
> >|       any.
> >
> >"/usr/bin/env" is the interpreter, the rest of the line forms
> >the single (optional) argument: "awk -f"
> >  Thus with the /usr/bin/env trick you can specify a program,
> >but no further arguments.
> 
> Of course, but you _need_ to specify an _optional_ argument.
> #!/usr/bin/env foo=bar awk -f
> works.

The program env is happy with 'foo=bar awk -f', the value for
'foo' is 'bar awk -f', awk isn't run.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>


More information about the tex-live mailing list