Skip to content

Instantly share code, notes, and snippets.

@alfredormz
Created January 29, 2014 15:46
Show Gist options
  • Save alfredormz/8690772 to your computer and use it in GitHub Desktop.
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
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