[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua CLI: how to pass arguments to -e
- From: Alex Bradbury <asb@...>
- Date: Sun, 12 Dec 2010 10:46:42 +0000
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