Pages

Tuesday, July 16, 2013

count number of blank lines in a file using grep



To count number of blank lines in a file, we use following grep expression.

$grep -c '^$' filename

=> this will try to extract lines starting and ending with nothing in between.

No comments:

Post a Comment