Bash-URL-decode
Jump to navigation
Jump to search
URL decode in bash
#!/bin/bash function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } urldecode "$(cat $1)"
$ x="http%3A%2F%2Fstackoverflow.com%2Fsearch%3Fq%3Durldecode%2Bbash" $ y=$(urldecode "$x") $ echo "$y" http://stackoverflow.com/search?q=urldecode+bash