[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua CLI: how to pass arguments to -e
- From: Alexander Gladysh <agladysh@...>
- Date: Sun, 12 Dec 2010 18:13:42 +0300
On Sun, Dec 12, 2010 at 16:53, Enrico Colombini <erix@erix.it> wrote:
> On 12/12/2010 14.28, Alexander Gladysh wrote:
>> The arguments come from the end-user. I want the shell to escape
>> arguments for me.
> A not-very-clean possibility (Windows version, use $n for Linux):
> (caller.bat):
> lua -e "arg={%1, %2, %3} print(arg[1], arg[2], arg[3])"
Arguments are not escaped in your example.
Imagine %1 to be "}; bad code {" (without quotes).
Alexander.