It seems that you would be better served to create a
daemon to control this process.
You could tailor it to notify you when the string you want appears and email or beep you. You should have a template of one on your system or you can copy from a simple one in a directory similar to /sbin/init.d/template.
cp template myscript
You will need to add a kill and start link in your rc directories for it to startup a boot time.
ln -s myscript /sbin/rc3.d/S400myscript
ln -s myscript /sbin/rc1.d/K400myscript
Hope this helps!
