Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- gmail_login="username"
- gmail_password="password"
- nbmail="$(wget --secure-protocol=TLSv1 --timeout=3 -t 1 -q -O - \
- https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom \
- --no-check-certificate | grep 'fullcount' \
- | sed -e 's/.*<fullcount>//;s/<\/fullcount>.*//' 2>/dev/null)"
- if [ -z "$nbmail" ]; then
- echo "Error"
- else
- if [ $nbmail != 0 ]; then
- <------>echo "$nbmail message(s)"
- else
- <------>echo "$nbmail message(s)"
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement