Eval312 » Historique » Version 2
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 | |||
13 | 1 input file. |
||
14 | |||
15 | h2. Outputs |
||
16 | |||
17 | 2 outputs: the result of the command. |
||
18 | |||
19 | h2. Shell Code |
||
20 | |||
21 | 2 | François Rioult | <pre> |
22 | |||
23 | 1 | François Rioult | cmd=$1; shift |
24 | args=$1; shift |
||
25 | value=$1; shift |
||
26 | input=$1; shift |
||
27 | output1=$1; shift |
||
28 | output2=$1; shift |
||
29 | |||
30 | $cmd "$args" $value $input $output1 $output2 |
||
31 | 2 | François Rioult | </pre> |
32 | 1 | François Rioult | |
33 | h2. Example |
||
34 | |||
35 | 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. |