Skip to content

Instantly share code, notes, and snippets.

@sebasbad
Last active December 9, 2016 07:55
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 sebasbad/63ef243669242f35981fc6e1cb1b88a7 to your computer and use it in GitHub Desktop.
Save sebasbad/63ef243669242f35981fc6e1cb1b88a7 to your computer and use it in GitHub Desktop.
urldecode using bash as per http://stackoverflow.com/a/37840948/1510621
# usage: $ urldecode https%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Durldecode%2Bbash
# result: https://google.com/search?q=urldecode+bash
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment