Grep exact match returns matches with periods, spaces, hyphens, etc

... | grep -w "2015"
hi 2015.halteriafu

I want my grep to return lines with “2015” exact matches.

In original data there can be any characters before and after 2015.
The above only omitted a few lines like ..yguj2015vj.. with 2015 having adjacent alphanumeric character.

Source: shell

Leave a Reply