Eval101 » Historique » Révision 5
Révision 4 (François Rioult, 18/06/2010 21:18) → Révision 5/7 (François Rioult, 22/06/2010 22:30)
h1. Eval101
h2. Synopsis
This operator has only one parameter and no input. The corresponding shell script executes the parameter as a command, and copies the result in the output.
h2. Parameters
1 parameter, treated as the command to be executed. The command can contains spaces, such as @ls -al@, @date -R@.
h2. Inputs
No input
h2. Outputs
1 output: the result of the command
h2. Shell code
<pre>
cmd=$1; shift
output=$1; shift
$cmd > $output
</pre>
h2. Example
This operator can be used for generating a file, containing the current date for example, with "date" as a parameter.
See the scenario [[missing.aws]], where this operator initiates an "empty" file with only the date for a "for" loop.