Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- url="<url>"
- key="<key>"
- user="<user name>"
- if [ "$1" = "help" ]
- then
- echo "To read message board:"
- echo "$0"
- echo ""
- echo "To post a message:"
- echo "$0 'Hello World'"
- exit 1
- fi
- if [ $# -lt 1 ];
- then
- curl -s "${url}?key=${key}&user=${user}"|grep -v -e '^<' -e '^ '
- else
- msg="$(echo $*|sed 's/ /%20/g')"
- curl -s "${url}?key=${key}&user=${user}&msg=${msg}"
- curl -s "${url}?key=${key}&user=${user}"|grep -v -e '^<' -e '^ '
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement