Hello,
I have a lot of files containing chat-log (IRC) and would like to extract information out of these files.
File sample
Code:
Session Start: Sat Apr 03 15:06:29 2010
Session Ident: XXX
[15:06] XXX is ~X@host-85-85-85-154.isp.be * XXX
[15:06] XXX on #channel1 #channel2 #channel3
[15:06] XXX using *.undernet.org The Undernet Underworld
[15:06] XXX End of /WHOIS list.
-
[15:06] <Me> Hello
[15:07] <Me> How are you ?
[15:15] <Me> Bye
Session Close: Sat Apr 03 15:16:52 2010
Session Start: Sat Apr 03 15:47:53 2010
Session Ident: XXX
[16:21] XXX No such nick
[16:21] XXX End of /WHOIS list.
-
[16:30] <Me> Hello
[16:31] <Me> How are you ?
[16:32] <XXX> Hello, fine and you ?
[16:32] <Me> ....
Session Close: Sat Apr 03 17:21:35 2010
I would like to extract in a separate file the info between the 'Session Start' and the 'Session Close' and isolate the /WHOIS informations at top of bottom of conversation like
File1
Code:
Session Start: Sat Apr 03 15:06:29 2010
Session Ident: XXX
[15:06] <Me> Hello
[15:07] <Me> How are you ?
[15:15] <Me> Bye
Session Close: Sat Apr 03 15:16:52 2010
[15:06] XXX is ~X@host-85-85-85-154.isp.be * XXX
[15:06] XXX on #channel1 #channel2 #channel3
[15:06] XXX using *.undernet.org The Undernet Underworld
[15:06] XXX End of /WHOIS list.
File 2
Code:
Session Start: Sat Apr 03 15:47:53 2010
Session Ident: XXX
[16:30] <Me> Hello
[16:31] <Me> How are you ?
[16:32] <XXX> Hello, fine and you ?
[16:32] <Me> ....
Session Close: Sat Apr 03 17:21:35 2010
[16:21] XXX No such nick
[16:21] XXX End of /WHOIS list.
I can find the interesting lines with egrep commands but don't see how to extract info and put it correctly into separate files ...
Any help is welcome. Thanks.