Created
January 29, 2014 15:46
-
-
Save alfredormz/8690772 to your computer and use it in GitHub Desktop.
Crea un reporte con la cantidad de elementos distintos de un tag xml dentro de un conjunto de archivos xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in *.xml; do xmlstarlet fo -R -Q $file; done | grep \<xml_tag\> | sort | uniq -c | sort -g | ruby -ne 'puts $_.gsub(/<\/?xml_tag\>/, "")' | |
# 26 Temporada | |
# 28 Corporativa | |
# 84 Rural | |
# 185 Industrial | |
# 2111 Comercial | |
# 19546 Residencial |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment