Hi!
Agrrr, wieso funktioniert folgendes nicht? Ich habe mir solche Muehe gegeben:-/
Das Script gibt nix aus:-(
#!/bin/bash
# *********************************************************
# * *
# * Creation: 27.07.2003 as *
# * Last update: 27.07.2003 as *
# * *
# * Arnim Staschke *
# *********************************************************
#
# ---------------------------------------------------------
# + Begin user editable +
# ---------------------------------------------------------
#
# Please edit and the following line if nessesary (I think not):
LOGFILE=/var/log/messages
# Please edit the following line,
# Put in your errormessage
#ERRORMESSAGE=eindeutiger_string_der_meldung
ERRORMESSAGE=kernel
# ---------------------------------------------------------
# + END user editable +
# + Don<B4>t edit below this line! +
# ---------------------------------------------------------
if [ ! -e "$LOGFILE" ]; then
echo ERROR: File does not exist on that place, you told me!
echo ERROR: Please correct the path.
exit 0
fi
while true
do
#
FINDIT=`tail -f $LOGFILE | grep $ERRORMESSAGE`
if [ "$FINDIT" = "$ERRORMESSAGE"]
then
#zum testen als echo. Spaeter der BEfehl
echo funktioniert > /home/arnim/funktioniert.txt
fi
done