Sunday, October 16, 2016

Parse XML using bash

$ rdom() { local IFS=\>; read -d\< E C; }; 
$ sed -n '/variable/,/variable/p' CC_SRV_ReloadExec_Pfe_SETENV.xml | grep -v variable | while rdom; do [ "${E:0:1}" != "/" ] && { echo  "<<<$E:$C>>>"; }  done

No comments:

Blog Archive