#!/bin/sh
bana=`basename $0`
if [ $1 = "-h" ]||[ $1 = "--help" ]
then
echo "ReiniĀ“s $bana"
echo ""
echo "$bana ohne Optionen = Interaktiv"
echo ""
echo "Temperaturen in Oesterreich"
echo $bana -g -c
echo ""
echo "Beobachtungen in Oesterreich"
echo $bana -g -b
echo "Temperaturen und Beobachtungen in Oesterreich"
echo $bana -g -a
echo "Warnungen verschicken"
echo $bana -w Zamg-URL email
echo "Keine Farbe"
echo "-nocol"
exit
fi
nocol=0
for a in $*
do
if [ $a = "-nocol" ]
then
nocol=1
fi
done
if [ $nocol = 0 ]
then
zeig1="\033[33m"
zeig2="\033[40G"
zeig3="\033[31m"
zeig4="\033[0m"
zeig5="\033[65G"
zeig6="\033[100G"
else
zeig1=""
zeig2=""
zeig3=""
zeig4=""
zeig5=""
zeig6=""
fi
if [ $1 = "-w" ]
then
if [ ! -f /tmp/"$bana"_"$3"_stat.file ]
then
touch /tmp/"$bana"_"$3"_stat.file
fi
wget -q $2 -O /tmp/"$bana"_"$3"_temp.file
warna=`cat /tmp/"$bana"_"$3"_temp.file|grep "
"|cut -f2 -d">"|cut -f1 -d"<"`
warnt=`cat /tmp/"$bana"_"$3"_temp.file|grep ""|cut -f2 -d">"|cut -f1 -d"<"`
title=`cat /tmp/"$bana"_"$3"_temp.file|grep ""|cut -f2 -d">"|cut -f1 -d"<"`
if [ -z "$3" ]
then
emai=root@localhost
else
emai=$3
fi
if [ ! -z "$warna" ]
then
statn=`echo "$warna $warnt"`
stata=`head -n1 /tmp/"$bana"_"$3"_stat.file`
if [ "$statn" != "$stata" ]
then
echo "Reinis Wetter-Warnung von $title \n $warna / Zeitraum = $warnt \n $2"|mail -s "Wetter-Warnung" root@localhost -b $emai
fi
echo "$statn" > /tmp/"$bana"_"$3"_stat.file
fi
exit
fi
rm /tmp/$bana 2> /dev/null
if [ $1 = "-g" ]
then
echo " "`date`
for a in wien niederoesterreich burgenland steiermark oberoesterreich salzburg kaernten tirol vorarlberg
do
if [ $a = "wien" ]
then
o=leer
for b in stammersdorf wienhohewarte donaufeld wienjubilaeumwarte innerestadt mariabrunn unterlaa schwechat
do
if [ $o = "leer" ]
then
o="$b"
p="$a"
else
if [ $b = schwechat ]
then
a=niederoesterreich
fi
wget -q http://wetter.orf.at/"$p"/"$o"/ -O /tmp/"$bana"_
wget -q http://wetter.orf.at/"$a"/"$b"/ -O /tmp/$bana
if [ $2 = "-c" ]||[ $2 = "-a" ]
then
celsi=`cat /tmp/$bana|grep Cels|head -n1|cut -f1 -d"&"`
celsi_=`cat /tmp/"$bana"_|grep Cels|head -n1|cut -f1 -d"&"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$celsi""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$celsi_""$zeig4"
fi
if [ $2 = "-b" ]||[ $2 = "-a" ]
then
beob=`cat /tmp/$bana|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
beob_=`cat /tmp/"$bana"_|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$beob""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$beob_""$zeig4"
fi
o=leer
rm /tmp/$bana 2> /dev/null
rm /tmp/"$bana"_ 2> /dev/null
fi
done
fi
if [ $a = "niederoesterreich" ]
then
for b in poysdorf krems stiftzwettl amstetten stpoelten wienerneustadt lunz reichenauanderrax
do
if [ $o = "leer" ]
then
o="$b"
p="$a"
else
wget -q http://wetter.orf.at/"$p"/"$o"/ -O /tmp/"$bana"_
wget -q http://wetter.orf.at/"$a"/"$b"/ -O /tmp/$bana
if [ $2 = "-c" ]||[ $2 = "-a" ]
then
celsi=`cat /tmp/$bana|grep Cels|head -n1|cut -f1 -d"&"`
celsi_=`cat /tmp/"$bana"_|grep Cels|head -n1|cut -f1 -d"&"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$celsi""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$celsi_""$zeig4"
fi
if [ $2 = "-b" ]||[ $2 = "-a" ]
then
beob=`cat /tmp/$bana|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
beob_=`cat /tmp/"$bana"_|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$beob""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$beob_""$zeig4"
fi
o=leer
rm /tmp/$bana 2> /dev/null
rm /tmp/"$bana"_ 2> /dev/null
fi
done
fi
if [ $a = "burgenland" ]
then
for b in podersdorf eisenstadt oe3-badtatzmannsdorf guessing
do
if [ $o = "leer" ]
then
o="$b"
p="$a"
else
wget -q http://wetter.orf.at/"$p"/"$o"/ -O /tmp/"$bana"_
wget -q http://wetter.orf.at/"$a"/"$b"/ -O /tmp/$bana
if [ $2 = "-c" ]||[ $2 = "-a" ]
then
celsi=`cat /tmp/$bana|grep Cels|head -n1|cut -f1 -d"&"`
celsi_=`cat /tmp/"$bana"_|grep Cels|head -n1|cut -f1 -d"&"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$celsi""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$celsi_""$zeig4"
fi
if [ $2 = "-b" ]||[ $2 = "-a" ]
then
beob=`cat /tmp/$bana|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
beob_=`cat /tmp/"$bana"_|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$beob""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$beob_""$zeig4"
fi
o=leer
rm /tmp/$bana 2> /dev/null
rm /tmp/"$bana"_ 2> /dev/null
fi
done
fi
if [ $a = "steiermark" ]
then
for b in muerzzuschlag mariazell mooslandl badmitterndorf hartberg leoben aigenimennstal grazuniversitaet zeltweg murau leibnitz deutschlandsberg
do
if [ $o = "leer" ]
then
o="$b"
p="$a"
else
wget -q http://wetter.orf.at/"$p"/"$o"/ -O /tmp/"$bana"_
wget -q http://wetter.orf.at/"$a"/"$b"/ -O /tmp/$bana
if [ $2 = "-c" ]||[ $2 = "-a" ]
then
celsi=`cat /tmp/$bana|grep Cels|head -n1|cut -f1 -d"&"`
celsi_=`cat /tmp/"$bana"_|grep Cels|head -n1|cut -f1 -d"&"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$celsi""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$celsi_""$zeig4"
fi
if [ $2 = "-b" ]||[ $2 = "-a" ]
then
beob=`cat /tmp/$bana|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
beob_=`cat /tmp/"$bana"_|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$beob""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$beob_""$zeig4"
fi
o=leer
rm /tmp/$bana 2> /dev/null
rm /tmp/"$bana"_ 2> /dev/null
fi
done
fi
if [ $a = "oberoesterreich" ]
then
for b in freistadt1 rohrbach schaerding linzstadt riediminnkreis ostermiething windischgarsten stwolfgang
do
if [ $o = "leer" ]
then
o="$b"
p="$a"
else
wget -q http://wetter.orf.at/"$p"/"$o"/ -O /tmp/"$bana"_
wget -q http://wetter.orf.at/"$a"/"$b"/ -O /tmp/$bana
if [ $2 = "-c" ]||[ $2 = "-a" ]
then
celsi=`cat /tmp/$bana|grep Cels|head -n1|cut -f1 -d"&"`
celsi_=`cat /tmp/"$bana"_|grep Cels|head -n1|cut -f1 -d"&"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$celsi""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$celsi_""$zeig4"
fi
if [ $2 = "-b" ]||[ $2 = "-a" ]
then
beob=`cat /tmp/$bana|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
beob_=`cat /tmp/"$bana"_|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$beob""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$beob_""$zeig4"
fi
o=leer
rm /tmp/$bana 2> /dev/null
rm /tmp/"$bana"_ 2> /dev/null
fi
done
fi
if [ $a = "salzburg" ]
then
for b in salzburgfreisaal lofer krimml radstadt zellamsee mariapfarr badgastein
do
if [ $o = "leer" ]
then
o="$b"
p="$a"
else
wget -q http://wetter.orf.at/"$p"/"$o"/ -O /tmp/"$bana"_
wget -q http://wetter.orf.at/"$a"/"$b"/ -O /tmp/$bana
if [ $2 = "-c" ]||[ $2 = "-a" ]
then
celsi=`cat /tmp/$bana|grep Cels|head -n1|cut -f1 -d"&"`
celsi_=`cat /tmp/"$bana"_|grep Cels|head -n1|cut -f1 -d"&"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$celsi""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$celsi_""$zeig4"
fi
if [ $2 = "-b" ]||[ $2 = "-a" ]
then
beob=`cat /tmp/$bana|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
beob_=`cat /tmp/"$bana"_|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$beob""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$beob_""$zeig4"
fi
o=leer
rm /tmp/$bana 2> /dev/null
rm /tmp/"$bana"_ 2> /dev/null
fi
done
fi
if [ $a = "kaernten" ]
then
for b in standrae badeisenkappel friesach klagenfurt villach spittalanderdrau mallnitz koetschachmauthen
do
if [ $o = "leer" ]
then
o="$b"
p="$a"
else
wget -q http://wetter.orf.at/"$p"/"$o"/ -O /tmp/"$bana"_
wget -q http://wetter.orf.at/"$a"/"$b"/ -O /tmp/$bana
if [ $2 = "-c" ]||[ $2 = "-a" ]
then
celsi=`cat /tmp/$bana|grep Cels|head -n1|cut -f1 -d"&"`
celsi_=`cat /tmp/"$bana"_|grep Cels|head -n1|cut -f1 -d"&"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$celsi""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$celsi_""$zeig4"
fi
if [ $2 = "-b" ]||[ $2 = "-a" ]
then
beob=`cat /tmp/$bana|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
beob_=`cat /tmp/"$bana"_|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$beob""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$beob_""$zeig4"
fi
o=leer
rm /tmp/$bana 2> /dev/null
rm /tmp/"$bana"_ 2> /dev/null
fi
done
fi
if [ $a = "tirol" ]
then
for b in virgen lienz kufstein mayrhofen innsbruck reutte landeck
do
if [ $o = "leer" ]
then
o="$b"
p="$a"
else
wget -q http://wetter.orf.at/"$p"/"$o"/ -O /tmp/"$bana"_
wget -q http://wetter.orf.at/"$a"/"$b"/ -O /tmp/$bana
if [ $2 = "-c" ]||[ $2 = "-a" ]
then
celsi=`cat /tmp/$bana|grep Cels|head -n1|cut -f1 -d"&"`
celsi_=`cat /tmp/"$bana"_|grep Cels|head -n1|cut -f1 -d"&"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$celsi""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$celsi_""$zeig4"
fi
if [ $2 = "-b" ]||[ $2 = "-a" ]
then
beob=`cat /tmp/$bana|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
beob_=`cat /tmp/"$bana"_|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$beob""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$beob_""$zeig4"
fi
o=leer
rm /tmp/$bana 2> /dev/null
rm /tmp/"$bana"_ 2> /dev/null
fi
done
fi
if [ $a = "vorarlberg" ]
then
for b in mittelberg langen gaschurn bregenz feldkirch brand
do
if [ $o = "leer" ]
then
o="$b"
p="$a"
else
wget -q http://wetter.orf.at/"$p"/"$o"/ -O /tmp/"$bana"_
wget -q http://wetter.orf.at/"$a"/"$b"/ -O /tmp/$bana
if [ $2 = "-c" ]||[ $2 = "-a" ]
then
celsi=`cat /tmp/$bana|grep Cels|head -n1|cut -f1 -d"&"`
celsi_=`cat /tmp/"$bana"_|grep Cels|head -n1|cut -f1 -d"&"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$celsi""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$celsi_""$zeig4"
fi
if [ $2 = "-b" ]||[ $2 = "-a" ]
then
beob=`cat /tmp/$bana|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
beob_=`cat /tmp/"$bana"_|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
echo "$zeig1""$a $b ""$zeig2""$zeig3""$beob""$zeig4 | $zeig5""$zeig1""$p $o ""$zeig6""$zeig3""$beob_""$zeig4"
fi
o=leer
rm /tmp/$bana 2> /dev/null
rm /tmp/"$bana"_ 2> /dev/null
fi
done
fi
done
exit
fi
while :
do
echo "\033[31m1\033[33m=Wien"
echo "\033[31m2\033[33m=Niederoesterrreich"
echo "\033[31m3\033[33m=Burgenland"
echo "\033[31m4\033[33m=Steiermark"
echo "\033[31m5\033[33m=Oberoesterreich"
echo "\033[31m6\033[33m=Salzburg"
echo "\033[31m7\033[33m=Kaernten"
echo "\033[31m8\033[33m=Tirol"
echo "\033[31m9\033[33m=Vorarlberg"
echo "\033[31m0\033[33m=Quit"
echo "\033[32mNummer ?\033[0m"
read land
case "$land" in
1) land=`echo "wien"`;;
2) land=`echo "niederoesterreich"`;;
3) land=`echo "burgenland"`;;
4) land=`echo "steiermark"`;;
5) land=`echo "oberoesterreich"`;;
6) land=`echo "salzburg"`;;
7) land=`echo "kaernten"`;;
8) land=`echo "tirol"`;;
9) land=`echo "vorarlberg"`;;
0) break;;
esac
if [ "$land" = "wien" ]
then
echo "\033[31m1\033[33m=Stammersdorf"
echo "\033[31m2\033[33m=Hohe Warte"
echo "\033[31m3\033[33m=Donaufeld"
echo "\033[31m4\033[33m=Jubilaeumswarte"
echo "\033[31m5\033[33m=Innere Stadt"
echo "\033[31m6\033[33m=Mariabrunn"
echo "\033[31m7\033[33m=Unterlaa"
echo "\033[31m8\033[33m=Wien-Schwechat"
echo "\033[31m0\033[33m=Quit"
echo "\033[32mNummer ?\033[0m"
read ort
case "$ort" in
1) ort=`echo "stammersdorf"`;;
2) ort=`echo "wienhohewarte"`;;
3) ort=`echo "donaufeld"`;;
4) ort=`echo "wienjubilaeumwarte"`;;
5) ort=`echo "innerestadt"`;;
6) ort=`echo "mariabrunn"`;;
7) ort=`echo "unterlaa"`;;
8) ort=`echo "schwechat"`;;
0) break;;
esac
if [ "$ort" = "schwechat" ]
then
land=`echo "niederoesterreich"`
fi
fi
if [ "$land" = "niederoesterreich" ]
then
echo "\033[31m1\033[33m=Poysdorf"
echo "\033[31m2\033[33m=Krems"
echo "\033[31m3\033[33m=Zwettl"
echo "\033[31m4\033[33m=Amstetten"
echo "\033[31m5\033[33m=St. Poelten"
echo "\033[31m6\033[33m=Wr. Neustadt"
echo "\033[31m7\033[33m=Lunz"
echo "\033[31m8\033[33m=Reichenau"
echo "\033[31m0\033[33m=Quit"
echo "\033[32mNummer ?\033[0m"
read ort
case "$ort" in
1) ort=`echo "poysdorf"`;;
2) ort=`echo "krems"`;;
3) ort=`echo "stiftzwettl"`;;
4) ort=`echo "amstetten"`;;
5) ort=`echo "stpoelten"`;;
6) ort=`echo "wienerneustadt"`;;
7) ort=`echo "lunz"`;;
8) ort=`echo "reichenauanderrax"`;;
0) break;;
esac
fi
if [ "$land" = "burgenland" ]
then
echo "\033[31m1\033[33m=Podersdorf"
echo "\033[31m2\033[33m=Eisenstadt"
echo "\033[31m3\033[33m=Bad Tatzmannsdorf"
echo "\033[31m4\033[33m=Guessing"
echo "\033[31m0\033[33m=Quit"
echo "\033[32mNummer ?\033[0m"
read ort
case "$ort" in
1) ort=`echo "podersdorf"`;;
2) ort=`echo "eisenstadt"`;;
3) ort=`echo "oe3-badtatzmannsdorf"`;;
4) ort=`echo "guessing"`;;
0) break;;
esac
fi
if [ "$land" = "steiermark" ]
then
echo "\033[31m1\033[33m=Muerzzuschlag"
echo "\033[31m2\033[33m=Mariazell"
echo "\033[31m3\033[33m=Mooslandl"
echo "\033[31m4\033[33m=Bad Mitterndorf"
echo "\033[31m5\033[33m=Hartberg"
echo "\033[31m6\033[33m=Leoben"
echo "\033[31m7\033[33m=Aigen"
echo "\033[31m8\033[33m=Graz"
echo "\033[31m9\033[33m=Zeltweg"
echo "\033[31m10\033[33m=Murau"
echo "\033[31m11\033[33m=Leibnitz"
echo "\033[31m12\033[33m=Deutschlandsberg"
echo "\033[31m0\033[33m=Quit"
echo "\033[32mNummer ?\033[0m"
read ort
case "$ort" in
1) ort=`echo "muerzzuschlag"`;;
2) ort=`echo "mariazell"`;;
3) ort=`echo "mooslandl"`;;
4) ort=`echo "badmitterndorf"`;;
5) ort=`echo "hartberg"`;;
6) ort=`echo "leoben"`;;
7) ort=`echo "aigenimennstal"`;;
8) ort=`echo "grazuniversitaet"`;;
9) ort=`echo "zeltweg"`;;
10) ort=`echo "murau"`;;
11) ort=`echo "leibnitz"`;;
12) ort=`echo "deutschlandsberg"`;;
0) break;;
esac
fi
if [ "$land" = "oberoesterreich" ]
then
echo "\033[31m1\033[33m=Freistadt"
echo "\033[31m2\033[33m=Rohrbach"
echo "\033[31m3\033[33m=Schaerding"
echo "\033[31m4\033[33m=Linz"
echo "\033[31m5\033[33m=Ried"
echo "\033[31m6\033[33m=Ostermiething"
echo "\033[31m7\033[33m=Windischgarsten"
echo "\033[31m8\033[33m=St. Wolfgang"
echo "\033[31m0\033[33m=Quit"
echo "\033[32mNummer ?\033[0m"
read ort
case "$ort" in
1) ort=`echo "freistadt1"`;;
2) ort=`echo "rohrbach"`;;
3) ort=`echo "schaerding"`;;
4) ort=`echo "linzstadt"`;;
5) ort=`echo "riediminnkreis"`;;
6) ort=`echo "ostermiething"`;;
7) ort=`echo "windischgarsten"`;;
8) ort=`echo "stwolfgang"`;;
0) break;;
esac
fi
if [ "$land" = "salzburg" ]
then
echo "\033[31m1\033[33m=Salzburg"
echo "\033[31m2\033[33m=Lofer"
echo "\033[31m3\033[33m=Krimml"
echo "\033[31m4\033[33m=Radstadt"
echo "\033[31m5\033[33m=Zell am See"
echo "\033[31m6\033[33m=Mariapfarr"
echo "\033[31m7\033[33m=Bad Gastein"
echo "\033[31m0\033[33m=Quit"
echo "\033[32mNummer ?\033[0m"
read ort
case "$ort" in
1) ort=`echo "salzburgfreisaal"`;;
2) ort=`echo "lofer"`;;
3) ort=`echo "krimml"`;;
4) ort=`echo "radstadt"`;;
5) ort=`echo "zellamsee"`;;
6) ort=`echo "mariapfarr"`;;
7) ort=`echo "badgastein"`;;
0) break;;
esac
fi
if [ "$land" = "kaernten" ]
then
echo "\033[31m1\033[33m=St. Andrae"
echo "\033[31m2\033[33m=Bad Eisenkappel"
echo "\033[31m3\033[33m=Friesach"
echo "\033[31m4\033[33m=Klagenfurt"
echo "\033[31m5\033[33m=Villach"
echo "\033[31m6\033[33m=Spittal"
echo "\033[31m7\033[33m=Mallnitz"
echo "\033[31m8\033[33m=Koetschach-Mauthen"
echo "\033[31m0\033[33m=Quit"
echo "\033[32mNummer ?\033[0m"
read ort
case "$ort" in
1) ort=`echo "standrae"`;;
2) ort=`echo "badeisenkappel"`;;
3) ort=`echo "friesach"`;;
4) ort=`echo "klagenfurt"`;;
5) ort=`echo "villach"`;;
6) ort=`echo "spittalanderdrau"`;;
7) ort=`echo "mallnitz"`;;
8) ort=`echo "koetschachmauthen"`;;
0) break;;
esac
fi
if [ "$land" = "tirol" ]
then
echo "\033[31m1\033[33m=Virgen"
echo "\033[31m2\033[33m=Lienz"
echo "\033[31m3\033[33m=Kufstein"
echo "\033[31m4\033[33m=Mayrhofen"
echo "\033[31m5\033[33m=Innsbruck"
echo "\033[31m6\033[33m=Reutte"
echo "\033[31m7\033[33m=Landeck"
echo "\033[31m0\033[33m=Quit"
echo "\033[32mNummer ?\033[0m"
read ort
case "$ort" in
1) ort=`echo "virgen"`;;
2) ort=`echo "lienz"`;;
3) ort=`echo "kufstein"`;;
4) ort=`echo "mayerhofen"`;;
5) ort=`echo "innsbruck"`;;
6) ort=`echo "reutte"`;;
7) ort=`echo "landeck"`;;
0) break;;
esac
fi
if [ "$land" = "vorarlberg" ]
then
echo "\033[31m1\033[33m=Mittelberg"
echo "\033[31m2\033[33m=Langen am Arlberg"
echo "\033[31m3\033[33m=Gaschurn"
echo "\033[31m4\033[33m=Bregenz"
echo "\033[31m5\033[33m=Feldkirch"
echo "\033[31m6\033[33m=Brand"
echo "\033[31m0\033[33m=Quit"
echo "\033[32mNummer ?\033[0m"
read ort
case "$ort" in
1) ort=`echo "mittelberg"`;;
2) ort=`echo "langen"`;;
3) ort=`echo "gaschurn"`;;
4) ort=`echo "bregenz"`;;
5) ort=`echo "feldkirch"`;;
6) ort=`echo "brand"`;;
0) break;;
esac
fi
clear
echo "\033[32m\033[4mWetter $land $ort\033[0m"
wget -q http://wetter.orf.at/"$land"/"$ort"/ -O /tmp/$bana
mess=`cat /tmp/$bana|grep Messwerte|sed 's/^ *//'|cut -f3 -d" "`
echo "\033[33mMesswerte von \033[31m"$mess"\033[33m Uhr\033[0m"
beob=`cat /tmp/$bana|grep Beobachtung|cut -f2 -d">"|cut -f1 -d"<"|cut -f2 -d":"`
echo "\033[33mBeobachtung\033[31m"$beob"\033[0m"
meter=`cat /tmp/$bana|grep Meter|cut -f1 -d"<"`
echo "\033[33mSeehoehe: \033[31m"$meter" m\033[0m"
celsi=`cat /tmp/$bana|grep Cels|head -n1|cut -f1 -d"&"`
echo "\033[33mTemparatur: \033[31m"$celsi" Cel\033[0m"
tau=`cat /tmp/$bana|grep Cels|head -n2|tail -n1|cut -f1 -d"&"`
echo "\033[33mTaupunkt: \033[31m"$tau" Cel\033[0m"
richt=`cat /tmp/$bana|grep Kilo|head -n1|cut -f1 -d","`
echo "\033[33mWindrichtung \033[31m"$richt"\033[0m"
wind=`cat /tmp/$bana|grep Kilo|head -n1|cut -f2 -d","|cut -f2 -d" "`
echo "\033[33mWindgeschwindigkeit: \033[31m"$wind" km/h\033[0m"
spitz=`cat /tmp/$bana|grep Kilo|tail -n1|cut -f2 -d","|cut -f2 -d" "`
echo "\033[33mWindspitze: \033[31m"$spitz" km/h\033[0m"
ldru=`cat /tmp/$bana|grep Hekto|cut -f1 -d"<"`
echo "\033[33mLuftdruck: \033[31m"$ldru" hPa\033[0m"
lfeu=`cat /tmp/$bana|grep Proz|cut -f1 -d"<"`
echo "\033[33mLuftfeuchtigkeit: \033[31m"$lfeu" %\033[0m"
sonn=` cat /tmp/$bana|grep Minuten|cut -f1 -d"<"`
echo "\033[33mSonnen pro Stunde: \033[31m"$sonn" min/h\033[0m"
rege=`cat /tmp/$bana|grep Millimeter|cut -f1 -d"<"`
echo "\033[33mNiederschlag \033[31m"$rege" mm/h\033[0m"
rm /tmp/$bana 2> /dev/null
while :
do
echo "\033[32mweiter mit Enter\033[0m"
read enter
break
done
done