summaryrefslogtreecommitdiffstats
path: root/kweather/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'kweather/test.sh')
-rwxr-xr-xkweather/test.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/kweather/test.sh b/kweather/test.sh
new file mode 100755
index 0000000..ee64ba2
--- /dev/null
+++ b/kweather/test.sh
@@ -0,0 +1,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
+