1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
The <act>oneliner</act> 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.
<p>
This group of actions offers three forms:
<ul>
<li> <act>oneliner</act>(<arg>lang</arg>, <arg>script</arg>) - execute the script in the language specified
<li> lang(script) - shorthand for the above
<li> lang - switch the command line interpreter to execute one-liners in the given language, until /exit
</ul>
<p>
For example, a simple calculation using awk can be done in three ways:
<ul>
<li> <i>oneliner(awk, 'print 42*3')</i>
<li> <i>awk('print 42*3')</i>
<li> <i>awk</i>, then <i>print 42*3</i>, then <i>/exit</i>
</ul>
|