For Example,consider the below line
<WORKFLOWLINK CONDITION ="" FROMTASK ="Start" TOTASK ="cmd_START_RUN"/>
From above line, I need to print Start from FROMTASK ="Start" using grep command or using any command.
For Example,consider the below line
<WORKFLOWLINK CONDITION ="" FROMTASK ="Start" TOTASK ="cmd_START_RUN"/>
From above line, I need to print Start from FROMTASK ="Start" using grep command or using any command.
On
If you just want value of FROMTASK, or some fixed variables try sed:
sed -nre 's/^.*FROMTASK *= *"([^"]*)".*$/\1/p' file
If you want to get value of any variables, try xmllint as sputnick answered
Use sudo apt-get install libxml2-utils(for debian) or yum install libxml2-utils to install it.
Try doing this :
xmllintfromlibxml2