Last active
June 22, 2021 09:02
-
-
Save jarryDk/9d7765a51a89acd4bfa23db9a7a6558f to your computer and use it in GitHub Desktop.
Nice format xml via script
This file contains hidden or 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 | |
# Link: https://stackoverflow.com/questions/16090869/how-to-pretty-print-xml-from-the-command-line#16090892 | |
# | |
# This utility comes with libxml2-utils: https://gitlab.gnome.org/GNOME/libxml2 | |
# | |
echo '<root><foo a="b">lorem</foo><bar value="ipsum" /></root>' | | |
xmllint --format - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment