How to count blank lines and non-blank lines in a file

Posted In Shell - By Tum. On Wednesday, January 1st, 2014 With 0 Comments

bash
เทคนิคสำหรับการนับบรรทัดว่างและการนับบรรทัดที่ไม่ว่างใน shell เพื่อนำไปต่อยอดการใช้งานหรือแก้ไขปัญหาต่างๆครับ

วิธีการนับบรรทัดว่างในไฟล์


หรือ

วิธีการนับบรรทัดที่ไม่ว่างในไฟล์

หรือ

แต่ถ้าหากต้องการนับบรรทัดที่ไม่ว่างโดยไม่รวมเอา comment (#) มาด้วย

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

*