Projet

Général

Profil

Eval121 » Historique » Version 2

François Rioult, 22/06/2010 22:50

1 1 François Rioult
h1. Eval121
2
3
h2. Synopsis
4
5
This operator has one parameter, two inputs and one output. The corresponding shell script executes the parameter as a command on both inputs, and copies the result to the output.
6
7
h2. Parameters
8
9
1 parameter, 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
input1=$1; shift
24
input2=$1; shift
25
output=$1; shift
26
27
$cmd $input1 $input2 > $output
28
</pre>
29
30 1 François Rioult
h2. Example
31
32
This operator is mainly used for combining two files :
33
* in all for-loops, where the accumulator is handled by a @cat@ or a @paste@ in the loop
34
* in the discretization process [[discretization.aws]] for computing the dictionary starting from the data and the columns format