noviceuser has asked for the wisdom of the Perl Monks concerning the following question:
Hi, i want to get below data in my perl script but am not aware of grep option to do that
suppose i have a file having below input lines, and i want to grep only lines having "03-15-2021" and not "03-15-2021-1" or 03-15-2021-2 etc
e.g. input:
03-15-2021-1 21.1.0-s103 2021/03/15:14:16:39 21.1 21.10-s103
03-15-2021-2 21.1.0-s103 2021/03/15:14:16:39 21.1 21.10-s103
03-15-2021 21.1.0-s102 2021/03/15:04:00:09 21.1 21.10-s102
output
03-15-2021 21.1.0-s102 2021/03/15:04:00:09 21.1 21.10-s102
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: grep only lines having matched pattern
by Discipulus (Canon) on Apr 01, 2021 at 09:18 UTC | |
|
Re: grep only lines having matched pattern
by Tux (Canon) on Apr 01, 2021 at 09:59 UTC | |
by Marshall (Canon) on Apr 01, 2021 at 21:34 UTC | |
by Tux (Canon) on Apr 02, 2021 at 07:43 UTC | |
|
Re: grep only lines having matched pattern
by philipbailey (Curate) on Apr 01, 2021 at 09:19 UTC | |
|
Re: grep only lines having matched pattern
by BillKSmith (Monsignor) on Apr 01, 2021 at 17:13 UTC | |
by Marshall (Canon) on Apr 02, 2021 at 02:11 UTC | |
|
Re: grep only lines having matched pattern
by Marshall (Canon) on Apr 02, 2021 at 00:11 UTC |