Created
May 8, 2020 13:00
-
-
Save eduo/47030937fec6d91e9823a6b01c923838 to your computer and use it in GitHub Desktop.
This file contains 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
#!/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