Cmd
Basicly it calls ‘cat <f_in> | <command> > <f_out>’. When <f_in>
is empty, then it runs
<command> > <f_out>
and when <f_out>
is empty, then it ‘cat <f_in> | <command>’.
<command> can be also a pipeline. If <f_in>
is partitioned, then <command>
is applied
on all partitions and keep the output <f_out>
also partitioned.
Synopsis
Cmd <f_in> <f_out> <command> evl cmd ( --help | --usage | --version )
Options
Standard options:
- --help
-
print this help and exit
- --usage
-
print short usage information and exit
- -v, --verbose
-
print to stderr info/debug messages of the component
- --version
-
print version and exit
Examples
- Write 10 times ’repeat some error message’ to the STDERR and into EVL job log:
Cmd "" /dev/stderr "yes repeat some error message | head"
2. Suppose from ‘SOME_FLOW’ we obtain integers, one by line, then median can be obtained from R and be written into ‘/some/file’:
Cmd SOME_FLOW /some/file "Rscript median.R"
The file median.R might look like this:
f <- file('stdin'); open(f); x <- c(); while ( length( line <- readLines(f) ) > 0 ) x <- c(x,as.integer(line)); write(median(x), stdout());