Last active
December 9, 2016 07:55
-
-
Save sebasbad/63ef243669242f35981fc6e1cb1b88a7 to your computer and use it in GitHub Desktop.
urldecode using bash as per http://stackoverflow.com/a/37840948/1510621
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
# 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