Created
June 1, 2018 13:18
-
-
Save dansherman/c2ff2d49402f5bc1e715752858fc46b7 to your computer and use it in GitHub Desktop.
Check gmail for textbar
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 | |
| USERNAME=email@address | |
| PASSWORD=password | |
| count=$(curl --url "imaps://imap.gmail.com/INBOX?UNSEEN" --user "$USERNAME:$PASSWORD" --silent | sed s:.*SEARCH\s:: | grep -o ' ' | wc -l | tr -d '[:space:]') | |
| if [ "$count" -gt 1 ]; then echo "🚩"; else echo "🏳️"; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment