## Setup url_encode/decode aliases to Encode/Decode URL strings in bash/shell
## Add the following aliases to your ~.bashrc, then reload your shell or source ~/.bashrc
alias url_decode='python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])"'
alias url_encode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
## Usage
url_encode DECODED_STRING
url_decode ENCODED_STRING
## Example
/root$ url_encode "Thunder & Lightning"
Thunder+%26+Lightning
/root$ url_decode Thunder+%26+Lightning
Thunder & Lightning