S
Super-User
i am trying to parse a something similar to this format.
the staring line can be starting at any hour(line1)and last line can be
any hour.
when the day changes to the next day. the hour changes to 00 (line 12)
how can i extract the first 11 lines
(17:00 -> 23:38)
then
(00:01 -> 23:38)
and so on and so on into individual files until end of the file
basically i want to create a file for each 24 hours. the only
thing consistent is the first 00 for each day.
from the first occurrence of this /\[\d\] \[00:/
till the line before its next occurrence and also extract
the top portion (no 00 to start with) into seperate files.
[1] [17:00:00.234234] blan blah blah
[2] [17:30:00.234234] blan blah blah
[1] [17:34:00.234234] blan blah blah
[1] [18:00:00.234234] blan blah blah
[2] [19:30:00.234234] blan blah blah
[1] [20:34:00.234234] blan blah blah
[1] [21:00:00.234234] blan blah blah
[2] [22:30:00.234234] blan blah blah
[1] [23:25:00.234234] blan blah blah
[1] [23:34:00.234234] blan blah blah
[1] [23:38:00.234234] blan blah blah
[1] [00:01:00.234234] blan blah blah
[1] [00:04:00.234234] blan blah blah
[1] [00:08:00.234234] blan blah blah
[1] [03:59:00.234234] blan blah blah
[1] [05:24:00.234234] blan blah blah
[1] [09:38:00.234234] blan blah blah
[1] [17:00:00.234234] blan blah blah
[2] [17:30:00.234234] blan blah blah
[1] [17:34:00.234234] blan blah blah
[1] [18:00:00.234234] blan blah blah
[2] [19:30:00.234234] blan blah blah
[1] [20:34:00.234234] blan blah blah
[1] [21:00:00.234234] blan blah blah
[2] [22:30:00.234234] blan blah blah
[1] [23:25:00.234234] blan blah blah
[1] [23:34:00.234234] blan blah blah
[1] [23:38:00.234234] blan blah blah
[1] [00:01:00.234234] blan blah blah
[1] [00:04:00.234234] blan blah blah
[1] [00:08:00.234234] blan blah blah
[1] [03:59:00.234234] blan blah blah
[1] [05:24:00.234234] blan blah blah
[1] [09:38:00.234234] blan blah blah
all help is appreciated and thanks for looking.
thanks.
the staring line can be starting at any hour(line1)and last line can be
any hour.
when the day changes to the next day. the hour changes to 00 (line 12)
how can i extract the first 11 lines
(17:00 -> 23:38)
then
(00:01 -> 23:38)
and so on and so on into individual files until end of the file
basically i want to create a file for each 24 hours. the only
thing consistent is the first 00 for each day.
from the first occurrence of this /\[\d\] \[00:/
till the line before its next occurrence and also extract
the top portion (no 00 to start with) into seperate files.
[1] [17:00:00.234234] blan blah blah
[2] [17:30:00.234234] blan blah blah
[1] [17:34:00.234234] blan blah blah
[1] [18:00:00.234234] blan blah blah
[2] [19:30:00.234234] blan blah blah
[1] [20:34:00.234234] blan blah blah
[1] [21:00:00.234234] blan blah blah
[2] [22:30:00.234234] blan blah blah
[1] [23:25:00.234234] blan blah blah
[1] [23:34:00.234234] blan blah blah
[1] [23:38:00.234234] blan blah blah
[1] [00:01:00.234234] blan blah blah
[1] [00:04:00.234234] blan blah blah
[1] [00:08:00.234234] blan blah blah
[1] [03:59:00.234234] blan blah blah
[1] [05:24:00.234234] blan blah blah
[1] [09:38:00.234234] blan blah blah
[1] [17:00:00.234234] blan blah blah
[2] [17:30:00.234234] blan blah blah
[1] [17:34:00.234234] blan blah blah
[1] [18:00:00.234234] blan blah blah
[2] [19:30:00.234234] blan blah blah
[1] [20:34:00.234234] blan blah blah
[1] [21:00:00.234234] blan blah blah
[2] [22:30:00.234234] blan blah blah
[1] [23:25:00.234234] blan blah blah
[1] [23:34:00.234234] blan blah blah
[1] [23:38:00.234234] blan blah blah
[1] [00:01:00.234234] blan blah blah
[1] [00:04:00.234234] blan blah blah
[1] [00:08:00.234234] blan blah blah
[1] [03:59:00.234234] blan blah blah
[1] [05:24:00.234234] blan blah blah
[1] [09:38:00.234234] blan blah blah
all help is appreciated and thanks for looking.
thanks.