Do you know where your variables are? | |
PerlMonks |
grep only lines having matched patternby noviceuser (Acolyte) |
on Apr 01, 2021 at 09:09 UTC ( [id://11130663]=perlquestion: print w/replies, xml ) | Need Help?? |
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
Back to
Seekers of Perl Wisdom
|
|