簡單的例子

編碼的 URL

HTTP%3A%2F%2Fwww.foo.com%2Findex.php%3Fid%3Dqwerty

使用此命令解碼 URL

echo "http%3A%2F%2Fwww.foo.com%2Findex.php%3Fid%3Dqwerty" | sed -e "s/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g" | xargs -0 echo -e

解碼的 URL(命令結果)

http://www.foo.com/index.php?id=qwerty