Mar 9, 2012, 6:26 AM
Post #3 of 11
Re: [jeffersno1] Regular expression for IP address and hostnames
[In reply to]
I'm trying to run some daily stats on our DNS servers and i've come across a few issues.
In this case, I strongly suggest making a separate posting for each issue - the discussions are easier to track.
each file is 20MB in size and there are 200 of them, what the best approach in getting these stats?
- run the script on 1 file at a time and increment on a counter? How would i do this?
- add them all to one file and run a script against a 2GB file - not too keen on this idea buts its easier,
Certainly the former, i.e. looping over the files (though I don't see why you need a counter). If you put together all the files into a big one, you loose the information about the individual files. Even if you put together all the files first, you would have a loop (for concatenating the files).
Is there a way i can grab everything after the query:spaceHOSTNAME and up to the spaceIN ?
Since your input data seems to be highly regular, consider doing a
# Not tested, adjust the indices if necessary