Can any please help me to write the shell script to find the value from the below xml:-
<?xml version="1.0" encoding="UTF-8"?>
<log>
<logentry revision="36">
<author>XYZ</author>
<date>2014-07-15T14:47:18.328479Z</date>
<paths>
<path action="A" localPath="ABC" kind="unknown">/branches/ABC</path>
<path action="A" localPath="ABC" kind="unknown">/branches/ABC</path>
<path action="M" localPath="DEF" kind="unknown">/branches/CDF</path>
<path action="M" localPath="DEF" kind="unknown">FRG</path>
</paths>
<msg>added</msg>
</logentry>
</log>
I want to extract the value of the localPath i.e "ABC" and "DEF" as output and write in one file.
sort -ustep is an artifact of your anonymization, rather than something that could ever happen with the genuine data.