Eval221 » Historique » Version 2
François Rioult, 22/06/2010 22:55
| 1 | 1 | François Rioult | h1. Eval221 |
|---|---|---|---|
| 2 | |||
| 3 | h2. Synopsis |
||
| 4 | |||
| 5 | This operator has two parameters, two inputs and one outputs. The corresponding shell script executes the parameters as a command on the inputs, and copies the result to the output. |
||
| 6 | |||
| 7 | h2. Parameters |
||
| 8 | |||
| 9 | 2 parameters, treated as the command to be executed. |
||
| 10 | |||
| 11 | h2. Inputs |
||
| 12 | |||
| 13 | 2 input files. |
||
| 14 | |||
| 15 | h2. Outputs |
||
| 16 | |||
| 17 | 1 output: the result of the command. |
||
| 18 | |||
| 19 | 2 | François Rioult | h2. Shell Code |
| 20 | |||
| 21 | <pre> |
||
| 22 | cmd=$1; shift |
||
| 23 | args=$1; shift |
||
| 24 | input1=$1; shift |
||
| 25 | input2=$1; shift |
||
| 26 | output=$1; shift |
||
| 27 | |||
| 28 | $cmd $args $input1 $input2 > $output |
||
| 29 | </pre> |
||
| 30 | |||
| 31 | 1 | François Rioult | h2. Example |
| 32 | |||
| 33 | This operator is used for applying a command with parameters, for example in [[perturbation.aws]] where the first parameter is the binary @perturbation@, the second is the parameter transmitted by Ariane, i.e. the percentage of perturbation. |