unix - I tried various cut commands but unable to get the output I desire -
cat decisionservice.txt /magi/household/magi_edg_flow.erf;/medicaid/magi_edg_flow;4;4 /vcl/vcl_ruleflow_1.erf;/vcl/vcl1_ebdc_flow;4;4 /vcl/vcl_ruleflow_2.erf;/vcl/vcl2_ebdc_flow;4;4
i tried this:
cat decisionservice.txt | cut -d ';' -f2 | cut -d '/' -f2 | tr -s ' ' '\n'
my output is:
$i=medicaid vcl vcl
whereas need output be:
$a=medicaid $b=vcl
well question, it's not clear want, guess don't want repeated vcl
in output. try adding sort , uniq @ end.
cat decisionservice.txt /magi/household/magi_edg_flow.erf;/medicaid/magi_edg_flow;4;4 /vcl/vcl_ruleflow_1.erf;/vcl/vcl1_ebdc_flow;4;4 /vcl/vcl_ruleflow_2.erf;/vcl/vcl2_ebdc_flow;4;4 cat decisionservice.txt | cut -d ';' -f2 | cut -d '/' -f2 | tr -s ' ' '\n'|sort|uniq medicaid vcl
Comments
Post a Comment