lua-users home
lua-l archive

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


On 12 December 2010 10:28, Alexander Gladysh <agladysh@gmail.com> wrote:
> 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?

How about this:

echo "print(...)" | lua - 1 2 3

Alex