lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.