]> hackdaworld.org Git - scripts/scripts.git/commitdiff
simple script to check exam result
authorhackbard <hackbard>
Sat, 26 Jul 2003 16:20:29 +0000 (16:20 +0000)
committerhackbard <hackbard>
Sat, 26 Jul 2003 16:20:29 +0000 (16:20 +0000)
check_exam_results.sh [new file with mode: 0755]

diff --git a/check_exam_results.sh b/check_exam_results.sh
new file mode 100755 (executable)
index 0000000..23fda71
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+# hackbard@hackdaworld.dyndns.org
+#
+# check exam results
+# $1 resultfile (http)
+# $2 your name/id
+
+# example: run by cron every 5 minuites .. ;)
+
+got_it="/usr/bin/mplayer -user hans -passwd wurst http://hackdaworld.dyndns.org/download/mp3db/atrak/killin_it.mp3"
+
+file=`basename $1`
+wget $1 2> /dev/null
+if [ ! -z "`grep $2 $file`" ]; then
+ rm $file
+ $got_it
+else
+ rm $file
+fi
+