Skip to content

Instantly share code, notes, and snippets.

@andresaquino
Created January 8, 2020 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andresaquino/173ac82b578b20522fee23e92e7d5fcc to your computer and use it in GitHub Desktop.
Save andresaquino/173ac82b578b20522fee23e92e7d5fcc to your computer and use it in GitHub Desktop.
Para cambiar el nombre de varios archivos CFDI y asignarles el UUID por nombre.
for oldname in Comprobantes*.xml; do newname=$(xmllint --format $efile | grep -o 'UUID="[^"]*' | sed -e "s/UUID=.//g"); mv ${oldname} ${newname^^}.xml; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment