I have a 6 GB application log file. The loglines have the following format (shortened)
[...] timestamp;hostname;sessionid-ABC;type=m timestamp;hostname;sessionid-ABC;set_to_TRUE [...] timestamp;hostname;sessionid-HHH;type=m timestamp;hostname;sessionid-HHH;set_to_FALSE [...] timestamp;hostname;sessionid-ZZZ;type=m timestamp;hostname;sessionid-ZZZ;set_to_FALSE [...] timestamp;hostname;sessionid-WWW;type=s timestamp;hostname;sessionid-WWW;set_to_TRUE I have a lot of session with more then these 2 lines. I need to find out all sessions with type=m and set_to_TRUE
My first attempt was to grep all sessionIDs with type=m and write it into a file. Then looping with every line from the file (1 sessionID per line) trough the big logfile and grep for sessionID;set_to_TRUE
This method takes a loooot of time. Can anyone give me a hint to solve this in a much better and faster way?
[...]actual lines or just a representation meaning continuation lines? Can you post a realistic data sample