BASH - quickly determine the number of lines in a file that start with a Uppercase -


how can determine number of lines in file start uppercase?

i think regex [a-z]*), don't want "read line" ... more faster.

your best option if don't want use read loop use grep, -c switch counts matching lines, this:

grep -c ^[a-z] the_file.txt 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -