View publishAmazonSNS.sh
#!/bin/bash | |
#This script creates a command line tool to publish a notification to Amazon SNS. | |
#The second parameter to urllib.quote is very important here. | |
#It overrides the default ignore character set which is just '/' | |
#If the default is set then the strings will not be url encoded to | |
#Amazon's requirements. | |
function urlencode { | |
python -c "import urllib; print urllib.quote('''$1''', '')" | |
} |