-
-
Save Sinistral2099/75f7b671afbfb22ff39407e2ab74ac3f to your computer and use it in GitHub Desktop.
Pushbullet bash script
This file contains hidden or 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 | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 <message> [title]" | |
exit | |
fi | |
MESSAGE=$1 | |
TITLE=$2 | |
if [ $# -lt 2 ]; then | |
TITLE="`whoami`@${HOSTNAME}" | |
fi | |
ACCESS_TOKEN="YOUR_ACCESS_TOKEN_HERE" | |
curl -u $ACCESS_TOKEN: https://api.pushbullet.com/v2/pushes -d type=note -d title="$TITLE" -d body="$MESSAGE" >/dev/null 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment