Ok so I will try to explain as best I can. I have a reporting system generating logging files every hour of the day for the whole month. I need to add up all these values into a grand total.
So what I was trying to do is do a readline to get the information and then input the information into a database.
Example of log file.
IP address Input Output Total
111.111.111.11 71836520 72412347 144248867
111.111.111.12 6743 0 6743
All I care about is the IP, and the total.
I was trying to use the split method, but that was when I thought it was tabs, not spaces and then I noticed that the amount of spaces isn't consistent as well because it changes for formating.
My guess is a readline to the right till it hits a space then do a readline from the right going left till it hits a space.
Any thoughts?
So what I was trying to do is do a readline to get the information and then input the information into a database.
Example of log file.
IP address Input Output Total
111.111.111.11 71836520 72412347 144248867
111.111.111.12 6743 0 6743
All I care about is the IP, and the total.
I was trying to use the split method, but that was when I thought it was tabs, not spaces and then I noticed that the amount of spaces isn't consistent as well because it changes for formating.
My guess is a readline to the right till it hits a space then do a readline from the right going left till it hits a space.
Any thoughts?