hello, i'm trying to pluck words from a list that have exactly 3 occurances of a specified letter. I've come up with this :
grep -i .*$1.*$1.*$1.*
But this also selects words with 4 or more, any tips?
I'm putting this into a shell procedure and want to be able to add a switch before I put the letter to searched in ($1), if you could point me to the correct manual page to read up on that it would be great, I'm using bourne shell.
Thanks in advance