![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Removing Blank Lines | dhanamurthy | Shell Programming and Scripting | 3 | 05-08-2008 01:52 AM |
| Eliminate blank lines... | shashi_kiran_v | UNIX for Dummies Questions & Answers | 4 | 09-06-2005 12:39 AM |
| Remove blank lines | osymad | UNIX for Dummies Questions & Answers | 4 | 08-27-2005 06:41 AM |
| delete blank lines or lines with spaces only | vascobrito | UNIX for Dummies Questions & Answers | 3 | 01-13-2004 07:36 AM |
| Blank Lines - End of file | saabir | Shell Programming and Scripting | 4 | 07-15-2003 11:55 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to count lines - ignoring blank lines and commented lines
What is the command to count lines in a files, but ignore blank lines and commented lines?
I have a file with 4 sections in it, and I want each section to be counted, not including the blank lines and comments... and then totalled at the end. Here is an example of what I would like my output to look like: ##comment## line1 line2 line3 line4 line5 line6 6 lines ##comment## line7 line8 line9 line10 line11 line12 line13 line14 line15 line16 line17 11 lines ##comment## line18 line19 line20 line21 line22 5 lines ##comment## line23 line24 line25 line26 line27 line28 line29 line30 line31 line32 line33 line34 line35 13 lines 35 total lines Thank you in advance, for your help! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|