Download Virata CLI
Transcript
- 180 - > variable-name The syntax for Search is: <variable-name> = search $<variable-name1> '<regular- expression>' <variable-name> = findval $<variable-name1> Readout.sh # this a shell file to verify the readout functionality. a = get system > b if $a eq 0 c = search $b 'Name[ ]*:[ ]*[a-zA-Z]' d = findval $c if d eq iad modify system name "titanium" else modify system name "iad" fi fi In this case the output of the command "get system" gets stored in the variable 'b' and then 'b' is searched for a regular expression 'Name[ ]*:[ ]*[a-zA-Z]' to get the variable 'c'. That is, 'c' gets the