summaryrefslogtreecommitdiffstats
path: root/kweather/test.sh
blob: ee64ba23323fe66a39c57d6da2acc2b51c81de19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
mkdir nowind nopress notemp
for  file in `ls .`
do
	METAR=`cat $file | grep -v ":"`
#	echo testing data $METAR
	KWEATHER=`dcopfind kweather* weatherIface`
	dcop "$KWEATHER" parseWeather "$METAR" false
	WIND=`dcop "$KWEATHER"  get_wind`
	PRESS=`dcop "$KWEATHER" get_pressure`
	TEMP=`dcop "$KWEATHER" get_temperature`
	if `test "$WIND"=""`
		then
			cp $file nowind/$file
	fi
	if `test "$PRESS"=""`
		then
			cp $file nopress/$file
	fi
	if `test "$TEMP"=""`
		then
			cp $file notemp/$file
	fi

	echo $WIND $PRESS $TEMP
#	#sleep 1
done