[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua and env
- From: Edgar Toernig <froese@...>
- Date: Thu, 13 Jun 2002 15:14:15 +0200
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.
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 :-(