Hi,
I have a file which keeps on appending the data continuously, i that i am looking for a particular pattern, if i dont find that pattern i want to wait for 30 seconds to check it again.
can we use it like this
-----------------------------
until [ $? -eq "0" ]
do
cat $line | tail -5 | grep 'PATTERN' > /dev/null
sleep 30
done
echo "File Contains the pattern 'PATTERN' now"
------------------------------------------------------
i am not able to get it, even if pattern is not there it is coming out of loop and executing echo command in any case.
Can someone plesae help me on this
thanks in advance