lua-users home
lua-l archive

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

Luiz Henrique de Figueiredo wrote:
> >Remove the -f option and do its action on the first non-option argument.
> But then how do you load and run several files, as below?
>         lua a b c d

Do you really need that?  Anyway:

  lua -e 'for _,f in nexti,arg do loadfile(f)() end' a b c d

or, if you need it so often that the -e is too long to type
you can add an option that performs above -e statement.

Ciao, ET.

  cat a b c d | lua -
  lua a && lua b && lua c && lua d
  lua -ra -rb -rc -rd
  lua -e 'foreachi(arg, dofile)' a b c d
does not work :-(