#!/bin/bash

BASE=/home/cschwede/public_html/weather_micky2

AKT_WEATHER=`$BASE/rss_wetter2.py |tr -s " "| sed -e 's/°/_/g'`
TDY_WEATHER=`$BASE/rss_wetter.py |tail -n 1 - | sed -e 's/°/_/g'`

echo $AKT_WEATHER | cut -d " " -f30|cut -d "_" -f 1 >$BASE/temp.txt
echo $AKT_WEATHER | cut -d " " -f35 >$BASE/pressure.txt
echo $AKT_WEATHER | cut -d " " -f38 >$BASE/wind.txt
echo $AKT_WEATHER | cut -d " " -f41|cut -d "_" -f 1 >$BASE/winddir.txt
echo $AKT_WEATHER | cut -d " " -f47 >$BASE/rainrate.txt
echo $AKT_WEATHER | cut -d " " -f60|cut -d "%" -f 1 >$BASE/hum.txt

echo $TDY_WEATHER | cut -d " " -f4|cut -d "_" -f 1 >$BASE/temp_min.txt
echo $TDY_WEATHER | cut -d " " -f10|cut -d "_" -f 1 >$BASE/temp_max.txt
echo $TDY_WEATHER | cut -d " " -f27 >$BASE/pressure_min.txt
echo $TDY_WEATHER | cut -d " " -f33 >$BASE/pressure_max.txt
echo $TDY_WEATHER | cut -d " " -f39 >$BASE/wind_max.txt
echo $TDY_WEATHER | cut -d " " -f42|cut -d "_" -f 1 >$BASE/winddir_max.txt
echo $TDY_WEATHER | cut -d " " -f46 >$BASE/rainsum_day.txt


