I'm trying to write a down and dirty plugin for nagios that will go out and log into a website using lynx, make sure each screen is what it should be along the way(greping and comparing as I go) then return a value at the end telling me if the system is ok, or broken. I have figured out how to pipe in commands to the application, or pipe out the screen output, but not both in sort of an interactive way. I saw something about forking, but that didn't seem to be what I was looking for.
I've been digging through the Oreilly book, searching online, and looking at other peoples' scripts, but I can't seem to find a similar type of program.
Is this possible and if so, how do I do it, or is there something I haven't found I should reference on how to do it.
Thanks,