Wednesday, November 28, 2007

To Strip an xml file for duplicate entries

Basically it greps for all the tags and sorts and prints the duplicates with the below script:


cat *.map.xml | grep include |
sed -e 's/^.*file\s*=\"//' |
sed -e 's/\".*$//' |
sort | uniq -d

No comments: