I have a data file that that contains data in the following format:
username event ip_address date (nn/mmm/nnnn) time (nn:nn:nn)
The event is either a user login or a user logout.
Ultimately my goal is to produce output with "paired" events in the following format:
username login ip_address date time
username logout ip_address date time (or no logout for user "username" on "ip_address")
I am having a hard time wrapping my head around how best to sort this into the format I need.
There could be thousands of users logged in at any one time and I have been browsing this data manually
looking for orphans. I need to find a way to automate this process.
Suggestions would be appriciated.