[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua CLI: how to pass arguments to -e
- From: Alexander Gladysh <agladysh@...>
- Date: Sun, 12 Dec 2010 13:28:26 +0300
Hi, list!
I want to pass command line arguments to a piece of code, that I
specify with -e:
$ lua -e 'print(...)' 1 2 3
What I see (as expected):
lua: cannot open 1: No such file or directory
What I want to get:
1 2 3
Is this possible?
Even if I pass /dev/null as a file, -e code does not see the arguments:
$ lua -e 'print("A", ...)' /dev/null 1 2 3
A
Alexander.
P.S. The reason why I want to do this is to let shell to escape the
arguments for me (actually I want to pass $@, not a hardcoded set of
arguments).