[tex-live] how robustly call awk script?

Martin Schröder martin at oneiros.de
Sun Jan 14 21:42:54 CET 2007


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.
#!/usr/bin/env - interpreter
foo=bar - optional argument
awk - program
-f - argument

But does this really need an _optional_ argument?

Best
   Martin


More information about the tex-live mailing list