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
PBx
October 29, 2025
Reply
grep -vc "^$" myfile.txt
Comment
grep -vc "^$" myfile.txt