Skip to content

Instantly share code, notes, and snippets.

@Sinistral2099
Forked from outadoc/pushbullet.sh
Last active August 23, 2018 00:36
Show Gist options
  • Save Sinistral2099/75f7b671afbfb22ff39407e2ab74ac3f to your computer and use it in GitHub Desktop.
Save Sinistral2099/75f7b671afbfb22ff39407e2ab74ac3f to your computer and use it in GitHub Desktop.
Pushbullet bash script
#!/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