Chciałem sobie zapodać w conkym sprawdzanie poczty na gmailu.
Oto mój skrypt:
Kod: Zaznacz cały
#!/bin/bash
gmail_login="login"
gmail_password="pass"
dane="$(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 "$dane" ]; then
echo "Connection Error !"
else
echo "GMail: $dane list(ów)"
fi
Kod: Zaznacz cały
~$ conky
Conky: statfs '/media/hdb1': No such file or directory
Conky: forked to background, pid is 13804
kacper@kacper-laptop:~$
Conky: desktop window (10000b6) is subwindow of root window (58)
Conky: window type - normal
Conky: drawing to created window (1400001)
Conky: drawing to double buffer
Conky: statfs '/media/hdb1': No such file or directory
/home/kacper/check_gmail.sh: line 10: https://login:pass@mail.google.com/mail/feed/atom: No such file or directory
/home/kacper/check_gmail.sh: line 11: --no-check-certificate: polecenie nieodnalezione
grep: : No such file or directory
/home/kacper/check_gmail.sh: command substitution: line 12: błąd składni w pobliżu nieoczekiwanego tokenu '|'
/home/kacper/check_gmail.sh: command substitution: line 12: `| sed -e 's/.*<fullcount>//;s/<\/fullcount>.*//' 2>/dev/null'
Conky: statfs '/media/hdb1': No such file or directory
Conky: statfs '/media/hdb1': No such file or directory
Conky: statfs '/media/hdb1': No such file or directory
Conky: statfs '/media/hdb1': No such file or directory
/home/kacper/check_gmail.sh: line 10: https://login:pass@mail.google.com/mail/feed/atom: No such file or directory
/home/kacper/check_gmail.sh: line 11: --no-check-certificate: polecenie nieodnalezione
Próbowałem też z innymi skryptami, efekt identyczny lub podobny.