Projet

Général

Profil

Eval111 » Historique » Version 4

François Rioult, 03/02/2011 20:54

1 1 François Rioult
h1. Eval111
2
3
h2. Synopsis
4
5
This operator has one parameter, one input and one output. The corresponding shell script executes the parameter as a command on the input, and copies the result in the output.
6
7
h2. Parameters
8
9
1 parameter, treated as the command to be executed.
10
11
h2. Inputs
12
13
1 input, the input file
14
15
h2. Outputs
16
17
1 output: the result of the command
18
19 3 François Rioult
h2. Shell code
20
21
<pre>
22
cmd=$1; shift
23
input=$1; shift
24
output=$1; shift
25
26
$cmd $input > $output
27
</pre>
28
29 1 François Rioult
h2. Example
30
31 4 François Rioult
This operator is mainly used, for filtering a file with the parameter as command, or computing a result from the input and writing it to the output. See [[CMAR]] for an example where this operator computes the predicted class for the column file of the votes.