Eval312 » Historique » Version 3
François Rioult, 22/06/2010 22:56
| 1 | 1 | François Rioult | h1. Eval312 |
|---|---|---|---|
| 2 | |||
| 3 | h2. Synopsis |
||
| 4 | |||
| 5 | This operator has two parameters, one input and two outputs. The corresponding shell script executes the parameters as a command on the input and may have two outputs. |
||
| 6 | |||
| 7 | h2. Parameters |
||
| 8 | |||
| 9 | 3 parameters, treated as the command (and its two parameters) to be executed. |
||
| 10 | |||
| 11 | h2. Inputs |
||
| 12 | 1 input file. |
||
| 13 | |||
| 14 | h2. Outputs |
||
| 15 | |||
| 16 | 2 outputs: the result of the command. |
||
| 17 | |||
| 18 | h2. Shell Code |
||
| 19 | |||
| 20 | 2 | François Rioult | <pre> |
| 21 | |||
| 22 | 1 | François Rioult | cmd=$1; shift |
| 23 | args=$1; shift |
||
| 24 | value=$1; shift |
||
| 25 | input=$1; shift |
||
| 26 | output1=$1; shift |
||
| 27 | output2=$1; shift |
||
| 28 | |||
| 29 | $cmd "$args" $value $input $output1 $output2 |
||
| 30 | 2 | François Rioult | </pre> |
| 31 | 1 | François Rioult | |
| 32 | h2. Example |
||
| 33 | |||
| 34 | This operator is used for applying a command with parameters, for example in [[CMAR.aws]] for the repartition task, that needs two parameters: the number of files and the current pair index. |