Re: When running from a script execlineb does not use separated args

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Tue, 31 Jul 2018 08:30:16 +0000

>> #!/bin/execlineb -W -S 1
>You're running into an unfortunate side effect of shebang lines where
>only the first argument is available.

  Exactly. Shebang parsing is done by the kernel, which does not have
a complete command line parser. (If it had, the execlineb program
would be redundant: we could simply put whole argvs into the
shebang line and the kernel would launch the whole command as
execlineb does.)

  The kernel's shebang parser only understands a single argument after
the interpreter's name. To pass further options to the interpreter,
you need to squash the options into a single word. So here, what you
want can be achieved via

#!/bin/execlineb -WS1

--
  Laurent
Received on Tue Jul 31 2018 - 08:30:16 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC