I have the below sample data and I need to extract lines which for specific date range. Say from 01/02/2018 to 06/02/2018 Last column in below sample is the date column dd/mm/yyyy format. Columns of file are seprated by one more spaces.

DQ94JD84 S8G2H A9X946N 111.222.333.123 HOME - [01/Feb/2018:01 +:08:39 -0800] 01/02/2018 XA29EN35 M4C6M D7F577Q 111.222.333.123 AWAY - [02/Feb/2018:01 +:08:39 -0800] 02/02/2018 JK20TQ67 K1L0V T6Z148X 111.222.333.123 HOME - [03/Feb/2018:01 +:08:39 -0800] 03/02/2018 SO78NZ28 B5S8J W9F920Z 111.222.333.123 HOME - [04/Feb/2018:01 +:08:39 -0800] 04/02/2018 BI55SY64 R6P5H A9U757R 111.222.333.123 HOME - [05/Feb/2018:01 +:08:39 -0800] 05/02/2018 MH72RG27 Y6X0N C7E352J 111.222.333.123 HOME - [01/Feb/2018:01 +:08:39 -0800] 01/02/2018 ET43US76 F5S3W X2L870O 111.222.333.123 HOME - [06/Feb/2018:01 +:08:39 -0800] 06/02/2018 QA43MM82 Y3K0O H8E229P 111.222.333.123 HOME - [11/Feb/2018:01 +:08:39 -0800] 11/02/2018 MK72HI41 A6W2I M3X402D 111.222.333.123 HOME - [15/Feb/2018:01 +:08:39 -0800] 15/02/2018 LJ28XY72 E0Z4L E8W757S 111.222.333.123 HOME - [22/Mar/2018:01 +:08:39 -0800] 22/03/2018 TJ47EG77 W5J6A A7L557Q 111.222.333.123 HOME - [01/Feb/2018:01 +:08:39 -0800] 01/02/2018 TJ47EG78 E6L8Z J4X329P 216.142.233.73 - - [30/Nov/2018:00:03: +08 -0500] 30/11/2018 TJ47EG79 N2V1H Q1Y615G 10.101.128.66 - - [03/Apr/2018:00:42:1 +1 -0500] 03/04/2018
Thanks.

In reply to extract lines from file between date range. by rinkish85

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.