lua-users home
lua-l archive

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


It was thus said that the Great Alexander Gladysh once stated:
> On Mon, Dec 13, 2010 at 07:51, Miles Bader <miles@gnu.org> wrote:
> > Alexander Gladysh <agladysh@gmail.com> writes:
> >>> In bash:
> 
> >>> lua <(echo 'code') arg1 arg2 ...
> 
> >> Wow! It passes my stdin test! How? o_O
> 
> > Another way that might be more portable:
> 
> >   echo 'print("A", ...)' | lua - 1 2 3
> 
> This seems to be quite popular.
> 
> Sorry, but the script can't use stdin with this version (see my
> earlier post in this topic).

  Is there some requirement that the code is specified via -e?  Can you not
make it a simple script with the execute bit set?  

  -spc