There may be other ways but:

\directlua{
local i=0
while (arg[i] \string~= nil) do
i = i+1
if ((arg[i] == '--output-dir') or (arg[i] == '-output-dir')) then
  print('\string\n\string\nthis: ' .. arg[i+1])
end
end
}

\bye


seems to work

On 6 April 2018 at 15:00, Patrick Gundlach <patr...@gundla.ch> wrote:
> Hi all,
>
> can I get the value of the command-line parameter --output-dir from within 
> Lua?
>
> Patrick
>
>
>

Reply via email to