blob: 3714513f7953f63c714a5e99f4babb34eeac93a6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/bash
set -xeuo pipefail
olds=""
while :
do
news=`curl -H "User-Agent: $0 kontakt anton@sijanec.eu" "https://www.mgl.si/sl/spored/?location=1&event=1072&subs=" | grep "big-date" | cut -d\> -f2 | cut -d\< -f1`
if [ "$news" = "$olds" ]
then
continue
fi
sendmail anton@sijanec.eu <<EOF
From: projects-r-skripti-mgl.sh@sijanec.eu
To: anton@sijanec.eu
Subject: novi datumi iskane predstave v mgl
datumi so: $news
EOF
olds=$news
sleep 60
done
|