So, it took me ages, but I finally learned to think in terms of regular expressions, thanks to using them in
But I still don't know how to translate that knowledge to
grep. I love my
grep, when I know what I'm doing with it, but the manual has always given me a headache.
I'd like to match stuff like the following lines:
CAPITALSFOLLOWING anewline. CAPI TALSFOLL owing ANEW line.
That is, lines that begin with two or more capital letters. But I can't figure out how.
kwrite, I would match these lines using:
grep... hmm. I have a feeling like it's something like:
me@ROOROO:~/$ grep "^[A-Z]something" filename
me@ROOROO:~/$ grep "^[A-Z][A-Z]+" filename
doesn't work (returns an empty file). A google search for the term 'grep match one or more occurrence' lead me to believe that
me@ROOROO:~/$ grep "^[A-Z][A-Z]*" filename
was the right syntax. But, alas, that doesn't do the trick.