News for hackers. Stuff that matters.
Re:Being Ridiculed for My Open Source Project (2013) by NateEag on Monday November 07, 2022 @12:40PM (#33509188)
Ah, thanks for clarifying. I did indeed misunderstand.

grep -o $pattern $filename | wc -l

would work in that case, I think.

I did have to think for a minute to come up with that version. It was definitely still much faster for me than writing my own matching logic would have been, but that may well be different for other people.

There are no comments on this comment yet.