The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
How to count lines - ignoring blank lines and commented lines
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
How to count lines - ignoring blank lines and commented lines
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
7
(
permalink
)
05-25-2007
matrixmadhan
Technorati Master
Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,960
Quote:
#egrep -cv '#|^$' active_servers
this displayed the total but on screen only, not in the file
If you had rather need the output on file, redirect that.
Code:
egrep -cv '#|^$' active_servers > somefilename
matrixmadhan
View Public Profile
Find all posts by matrixmadhan
Find matrixmadhan's past nominations received
Find matrixmadhan's present nominations given