This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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''', '')" | |
} |