I have a log file like this. The part between += are almost similar from which I need to fetch for IP Address and Connection time only for domain perl.com. The perl.com domain may scattered in log. The main intension of my work is that this log keeps a record of the users who visits websites. I have to get the doc printed that contains specific domain visits and time. Thought the below one I will take as a sample data. The IP address can be the 10 or 11th line from Domain line. Was first thinking of getting this by using head and tail command in unix. This works for me but for windows box this will be a problem as I don't have cygwin installed which I will not be able to do. All comments are welcomed. Thanks..!
--------log-------- +=========================+ Domain : perl.com hostname .... .... IP:XXX.XXX.XXX.XXX Connection Time:XXX secs .... .... .... .... +=========================+ Domain : domain.com hostname .... .... IP:XXX.XXX.XXX.XXX Connection Time:XXX secs .... .... +=========================+ Domain : education.com hostname IP:XXX.XXX.XXX.XXX .... .... Connection Time:XXX secs .... .... +=========================+ Domain : perl.com hostname IP:XXX.XXX.XXX.XXX .... .... Connection Time:XXX secs .... .... +=========================+ --------log--------