blob: 111706301f496df2d9e841f8f1c95a5bbfe96a97 (
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
sleep 60
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
done
|