Urlencode and Urldecode 命令行
由于经常使用,简单记录之
$ alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
$ urlencode 'q werty=/;'
q+werty%3D%2F%3B
alias urldecode='python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])"'
$ urldecode 'q+werty%3D%2F%3B'
q werty=/;