I am looking for a way to search a file for a specific pattern '.00' and want to calculate how often it appears. grep -o '.00' file does this quite well. Unfortunately I do not know how to exclude any pattern which contains the pattern I want to have but is a longer string.
What I want to have :
number of times, '.00' appears in the file
What I want to exclude :
longer patterns like '0.000001' so everything '*.00*'
Does anybody have an idea? Could I do something like "grep -o ('.00' and not '*.00*') ?
Thanks in advance, advice and boosting appreciated.
@IntegralDuChemin do it like this
something | grep ".00" | grep -v ".00*"
@freemo Great thanks. In my case less should do as well 🙂
@IntegralDuChemin yea another command, find makes the most sense if you wanna go recursive