Skip to content

Instantly share code, notes, and snippets.

@eduo
Created May 8, 2020 13:00
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 eduo/47030937fec6d91e9823a6b01c923838 to your computer and use it in GitHub Desktop.
Save eduo/47030937fec6d91e9823a6b01c923838 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
#Tidy Up the format of all XMLs in a folder with xmllint
mkdir good 2>/dev/null
mkdir origXML 2>/dev/null
ls -1 *.xml | while read file; do xmllint --format "${file}" > good/"${file}"; done
mv *.xml origXML/.
mv good/*.xml ./.
rm -rf good
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment