The oneliner action is designed for quick execution of short,
trivial scripts, such as a for loop for repeating an action. It supports
any scripting language currently availabel through fungw. Each oneliner is
an independent script context - variables, functions and other global states
do not persist.
This group of actions offers three forms:
- oneliner(lang, script) - execute the script in the language specified
- lang(script) - shorthand for the above
- lang - switch the command line interpreter to execute one-liners in the given language, until /exit
For example, a simple calculation using awk can be done in three ways:
- oneliner(awk, 'print 42*3')
- awk('print 42*3')
- awk, then print 42*3, then /exit