Skip to main navigation
Skip to main content
Skip to search
How to count the number of non-blank lines with Bash
Wednesday, Sep 3, 2025
Home
Archive
About
Contact
Search
⬅︎ Back to
How to count the number of non-blank lines with Bash
Comment
Emi
September 12, 2025
Reply
$ grep -v "^$" myfile.txt | wc -l
Comment
$ grep -v "^$" myfile.txt | wc -l