Script needed...

Hi!

I have a file which has a list of host, I want to ssh to each of the first box for an app and grep through the logs for version of the application and look for a certain string "Connection is open" in the log file. The file I am refering to looks like this -

Re: Script needed...

Hi Allan:

> I want to ssh to first host of each app then grep for a string called "connection is open" and also parse out (20100613) from a string of line like the following from the log file -

This isn't a very clear description of what you want. Are you saying that if you find the string "connection is open" in the log, then and only then do you want to report lines that contain the string "20100613"?

A simple shell script could read you list of hosts and derive the logfile names associated with each host. This could look like: