lua-users home
lua-l archive

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


>The virtue of awk is the implicit input and pattern-action syntax,
>but that can also make it clumsy in some circumstances.

Perhaps we could revamp the lua standalone to accept a command line
argument which would put it into "awk mode". One feature of sed and
awk that never quite seems practical with lua is the ability to do
powerful things with a single line using the -e option.

In this mode, lua would read its input record by record (lines by
default) and perform various actions based on a pattern (including
address) match. Has anyone added an implicit record traversal loop
and matching mechanism like this to lua?

Kurt Jung
kurt.jung@michigancat.com