extracting a range of lines.

Discussion in 'Perl' started by test, Apr 16, 2006.

  1. test

    test Guest

    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 the first 11 lines
    (17:00 -> 23:38)
    then
    (00:01 -> 23:38)
    and so on and so on.

    basically i want to create a file for each 24 hours. the only thing
    consistent is the first 00 for each day.
    /\[\d\] \[00:/

    [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.
    test, Apr 16, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron Coutts
    Replies:
    0
    Views:
    106
    Ron Coutts
    Dec 15, 2003
  2. Kris Leech

    extracting lines from an address

    Kris Leech, Nov 17, 2005, in forum: Ruby
    Replies:
    8
    Views:
    150
    William James
    Nov 17, 2005
  3. tmarc

    Extracting range of lines

    tmarc, Jul 15, 2008, in forum: Ruby
    Replies:
    2
    Views:
    292
    Peña, Botp
    Jul 15, 2008
  4. it_says_BALLS_on_your forehead

    extract range of lines using range op bug?

    it_says_BALLS_on_your forehead, Mar 3, 2006, in forum: Perl Misc
    Replies:
    3
    Views:
    177
    it_says_BALLS_on_your forehead
    Mar 3, 2006
  5. vivek_12315

    Extracting a range of words!

    vivek_12315, Dec 16, 2010, in forum: Perl Misc
    Replies:
    5
    Views:
    131
    Justin C
    Dec 17, 2010
Loading...

Share This Page