Assign
(since EVL 1.2)
Assign the content of input flow or file <f_in>
into shell variable <varname>
, which
is then exported into environment. Don’t forget to apply ‘--text-output’ on preceding
component to get text content in the <variable>
.
This component doesn’t work for partitioned flow.
- Assign
-
is to be used in EVS job structure definition file.
<f_in>
is either input file or flow name.
There is no standalone version of this component as you can use standard Bash behaviour for this purpose. For example:
VARNAME=$(evl cat filename some.evd --text-output)
EVS is EVL job structure definition file, for details see evl-evs(5).
Synopsis
Assign <f_in> <varname> evl assign ( --help | --usage | --version )
Options
Standard options:
- --help
-
print this help and exit
- --usage
-
print short usage information and exit
- --version
-
print version and exit
Examples
- EVL job (an ‘evs’ file) which reads content of a binary file ‘hwm.bin’ into variable
‘HWM’:
Read hwm.bin FLOW_HWM evd/some.evd --text-output Assign FLOW_HWM HWM
Such a value can be then used (after Wait component!) within mapping by:
static int hwm = atoi(std::getenv("HWM")); *out->incremental_id = ++hwm;
- To get a value from text file:
Assign hwm.txt HWM
- To assign flow content into a ‘NATCO’ variable:
Map FLOW_01 FLOW_02 in.evd out.evd map.evm --text-output Assign FLOW_02 NATCO