SMSで明日の天気予報を取得したかった。 もちろん無料です:)そして、私は長い間それを望んでいました。正常に機能するスクリプトが書かれましたが、しばらく前に停止しました(サイトの形式が変更されました)。 同時にスクリプトを書き直し、「予測プロバイダー」を有名な
Gismeteoに変更することにし
ました 。 スクリプトは完璧ではない可能性があることを事前に予約しますが、それは何らかの形で普遍的です(translitを送信するオプションがあります)。
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
-
#!sh
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin; export PATH
fetch -a -q -w 5 -o / tmp / weather.xml http: // informer.gismeteo.ru / rss / 48454.xml
iconv -c -f windows- 1251 -t koi8-r / tmp / weather.xml > / tmp / weather-koi8.xml
TODAY = ` date -v+1d "+%d:" `
# -= Night =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERN = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERN = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
# -= Day =-
WEATHER_BETA = ` cat / tmp / weather-koi8.xml | grep -A 2 ": " | tail -n 1 `
CLOUDINESS = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $3}' `
PRECIPITATION = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $4}' `
TEMPERATURE = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $5}' | awk '{print $2}' `
WIND = ` echo $WEATHER_BETA | awk -F "<|>|," '{print $7 $8}' | awk '{print $2 " " $3 $4}' `
if [ " $PRECIPITATION " != " " ]
then
WEATHERD = ` echo $TEMPERATURE ", " $CLOUDINESS ", " $WIND `
else
WEATHERD = ` echo $TEMPERATURE ", " $PRECIPITATION ", " $WIND `
fi
WEATHERN_TR = ` echo $WEATHERN | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
WEATHERD_TR = ` echo $WEATHERD | tr "" "abvgdezijklmnoprstufhc'yABVGDEZIJKLMNOPRSTUFHC'Y" | sed -e 's//io/g;s//zh/g;s//ch/g;s//sh/g;s//sch/g;s//\`e/g;s//yu/g;s//ya/g;s//"/g;s//Io/g;s//Zh/g;s//Ch/g;s//Sh/g;s//Sch/g;s//\`/g;s//Yu/g;s//Ya/g;s//"/g;' `
echo $TODAY $WEATHERN_TR "; " $WEATHERD_TR
# Translit
#echo $TODAY $WEATHERN_TR $WEATHERD_TR | mail -s "" number@sms.your.sms.gate -froot@yourdomain.net
# Cyrillic
echo $TODAY $WEATHERN "; " $WEATHERD | iconv -c -f koi8-r -t CP1251 | mail -s "" number @ sms.your.sms.gate -froot @ yourdomain.net
rm -f / tmp / weather.xml
rm -f / tmp / weather-koi8.xml
スクリプトノート:
- 「number@sms.your.sms.gate」の代わりに、当然、オペレーターの推奨事項に従って番号を入力する必要があります
- 「root@yourdomain.net」の代わりに、有効なアドレスを入力する必要があります。 それはいくつかの演算子によってチェックされ、アドレスができるだけ短いことが望ましい、なぜなら それはメインテキストのSMSに含まれており、いくつかの貴重な文字を「食べる」
- あなたはおそらくキリル文字をいじる必要があります。なぜなら、SMSの文字数の半分からオペレーター側の強制的な音訳まで、多くの制限が適用されるからです
- 複数の受信者を指定する必要がある場合は、次のようにする必要があります
/usr/bin/mail -s "" -c number2@sms.your.sms.gate,number3@sms.your.sms.gate number1@sms.your.sms.gate -froot@yourdomain.net
また、すべての受信者を1文字に固執しないでください。郵便配達員の設定では、受信者の数に制限がある場合があります - 元のxmlは1日4回更新されます:冬時間の2:30、8:30、14:30、および20:30モスクワ時間
______________________
UPD: - このスクリプトは当初、FreeBSD 7.1のユーティリティへの絶対パスを示していました。 それらを別の場所に置くことができます! したがって、所定のパスを持つスクリプトがある場合は、スクリプトから削除することをお勧めします。crontabを編集するときは、最初に、スケジュールの前に、次のようにOSの正しいPATHを記述します:
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
- 目的の都市のIDは、xml-informerの設定で確認できます。
それだけです。 スクリプトをcrontabに追加するだけです。 誰かが役に立つといいのですが:)
PS私はウクライナのビーラインの加入者にメールでSMSサービスについて読むことを強くお勧めします-それはキリル文字受信を可能にする方法と「接着された」SMSを受信する可能性について説明します。