Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Info from flat ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 10732 of 11992
Post > Topic >>

Info from flat file

by manojkumarg@[EMAIL PROTECTED] (Manoj) Mar 15, 2008 at 01:03 AM

--Boundary_(ID_F0sHH2583WR16rs9KXhUew)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT

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--------


--Boundary_(ID_F0sHH2583WR16rs9KXhUew)--
 




 7 Posts in Topic:
Info from flat file
manojkumarg@[EMAIL PROTEC  2008-03-15 01:03:38 
Re: Info from flat file
chas.owens@[EMAIL PROTECT  2008-03-15 18:35:56 
RE: Info from flat file
manojkumarg@[EMAIL PROTEC  2008-03-16 12:50:43 
RE: Info from flat file
manojkumarg@[EMAIL PROTEC  2008-03-25 13:02:15 
Re: Info from flat file
chas.owens@[EMAIL PROTECT  2008-03-25 03:43:22 
RE: Info from flat file
manojkumarg@[EMAIL PROTEC  2008-04-28 23:59:12 
RE: Info from flat file
emperorrob@[EMAIL PROTECT  2008-04-28 12:08:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 11:08:16 CDT 2008.