Skip to content

Instantly share code, notes, and snippets.

@Chouchen
Created March 15, 2016 13:07
Show Gist options
  • Select an option

  • Save Chouchen/c4d305b8bd35d2a4733d to your computer and use it in GitHub Desktop.

Select an option

Save Chouchen/c4d305b8bd35d2a4733d to your computer and use it in GitHub Desktop.
xmlpretty bash aliases
# for .bash_aliases
xmlpretty() {
local ORIGINAL=$1
local FILENAME=${ORIGINAL%.xml}
local FINAL=${FILENAME##*/}
xmllint --format "$1" --output ${FINAL}.pretty.xml
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment