Skip to content

Instantly share code, notes, and snippets.

@lkdjiin
Last active March 3, 2016 09:50
Show Gist options
  • Save lkdjiin/fef3645cae906fd6cd85 to your computer and use it in GitHub Desktop.
Save lkdjiin/fef3645cae906fd6cd85 to your computer and use it in GitHub Desktop.
XML prettify
#!/usr/bin/env bash
# xmllint comes from the libxml2-utils package.
if [ $# -eq 1 ]; then
cat $1 | xmllint --format -
else
printf "\n Usage xml-pretty file.xml\n\n"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment