Projet

Général

Profil

Tee » Historique » Version 3

François Rioult, 22/06/2010 23:19

1 1 François Rioult
h1. Tee
2
3 2 François Rioult
This operator has one parameter, one input and one output. The corresponding shell script copies the input to the output and to the file having the parameter as name.
4
5
It is an alternative to the standard file saver of Ariane and it allows to "rename" the input of a component.
6
7
h2. Parameters
8
9
1 parameter, treated as the name of the file to which the input it copied.
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
h2. Shell code
20
21 1 François Rioult
<pre>
22
filename=$1; shift
23
input=$1; shift
24
output=$1; shift
25
26
cat $input | tee $filename > $output
27
</pre>
28 2 François Rioult
29
h2. Example
30
31
This operator is mainly used for renaming the temporary file generated by Ariane, for example for invoking [[Weka]] (see [[perturbation-weka.aws]], that needs specific file extension.