I know that xml parsers are the ideal way to go here, but none are available or are able to be added to my environment.
Lets take XML which follows the following structure:
<CONTAINER>
<FOLDER NAME="I_RS_INT">
</FOLDER>
<FOLDER NAME="I_R_INR">
</FOLDER>
<FOLDER NAME="I_RS_TRN">
</FOLDER>
</CONTAINER>
In a bash script, I wish to remove all nodes where the <FOLDER NAME=
matches *RS*
OR remove all nodes where <FOLDER NAME != $var_folder
Any help greatly appreciated!
rmdir -rf
?? – Chris Finlayson Oct 27 '16 at 07:57<FOLDER NAME...
lines, but I require it to take out the entire node (with its child elements), otherwise it will invalidate the xml. Again, apologies if not being absolutely clear in my question. – Chris Finlayson Oct 27 '16 at 08:47