Skip to content

Commit 4b1d74c

Browse files
committed
gmail check script added
1 parent d7a314f commit 4b1d74c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

check_gmail.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
read -p "Input your name in gmail: " username;
4+
read -p "Input your password in gmail: " password;
5+
6+
echo -e "Checking for new messages... \c"
7+
8+
atomlines=`wget -T 3 -t 1 -q --secure-protocol=TLSv1 \
9+
--no-check-certificate \
10+
--user=$username --password= $password \
11+
https://mail.google.com/mail/feed/atom -O - \
12+
| wc -l`
13+
14+
echo -e "\r\c"
15+
16+
[ $atomlines -gt "8" ] \
17+
&& echo -e " You have new gmail." \
18+
|| echo -e " No new gmail."

0 commit comments

Comments
 (0)