[lug] More script questions

winrip winrip at speakeasy.org
Thu Apr 27 17:58:05 MDT 2000


OK wel I figured out a way to do it so far, by the way thanks for the
responses. However I need someone to look this over I get an "syntax error near
unexpected token `do' " message.

Anyway I got this far but I can't figure this last error out. 

#! /bin/sh

testl1 = 0
testl2 = 1

 while [testl1 != testl2]

p1 = "`ps x|awk '/program/ {print $1}' |head -1`"
p2 = "`ps x|awk '/program/ {print $1}' |head -2 |tail -1`"

    if [p1 + 2 == p2]; then
    echo " Program Is Down!!" |mail winrip at p2.winrip.cx
    testl1 = 0 
    else
   testl2 = 1 
   fi
do 
sleep 5
done


echo "done for now"




More information about the LUG mailing list