#!/bin/sh stat=`cat $1` case $stat in FAIL) echo put here something for FAIL state ;; LOWBATT) echo put here something for BATTERY LOW state ;; OK) echo put here something for return to OK state ;; *) # must never be echo Usage: $0 statusfile echo Valid strings in statusfile: echo FAIL echo LOWBATT echo OK esac rm -f $1