Why does the following command still return some lines containing a capital letter?
aspell dump master | grep ozz | grep -v '[^A-Z]'
You probably want:
to remove the lines with at least one upper-case letter, or:
to remove the lines with at least one of 26 ASCII characters between
First off, you are inverting an inversion, which isn't want you want. What you are looking for is more like this:
You are matching on individual characters. You need to match on more than just 1 (if you want to only select lines that don't have caps). So we add the asterisk (*) to the end. This means, I am looking for lines that have 0 or more non-capital letters. We add the caret (^) to the front and the dollar sign ($) to the end to denote, from the beginning of the line to the end of the line. So this can be read as, from the beginning of the line to the end of the line, 0 or more characters that don't contain any character from A-Z.
Hope this helped.
To remove only lines beginning with a capital letter: