Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Linux only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Linux
count lines wihtout comments
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
aparajita
New Member
Join Date:
Mar 2008
Posts:
8
#1
count lines wihtout comments
Mar 25 '08, 12:45 PM
How can i copunt no of lines in a ksh script without counting the commented lines..
is there any single line command
micmast
New Member
Join Date:
Mar 2008
Posts:
144
#2
Mar 25 '08, 02:09 PM
reverse a grep then count
grep -v \# | wc -l
Comment
Post
Cancel
aparajita
New Member
Join Date:
Mar 2008
Posts:
8
#3
Mar 26 '08, 12:15 PM
Originally posted by
micmast
reverse a grep then count
grep -v \# | wc -l
Thanks a lot.
Really
Comment
Post
Cancel
radoulov
New Member
Join Date:
Jun 2007
Posts:
34
#4
Mar 28 '08, 11:59 AM
Or:
Code:
grep -c '^[^#]' file
Comment
Post
Cancel
aparajita
New Member
Join Date:
Mar 2008
Posts:
8
#5
Apr 4 '08, 06:21 AM
Thanks a Lot for the alternative solutio
Comment
Post
Cancel
ghostdog74
Recognized Expert
Contributor
Join Date:
Apr 2006
Posts:
511
#6
Apr 6 '08, 03:04 PM
Originally posted by
micmast
reverse a grep then count
grep -v \# | wc -l
it really depends on where "#" is.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment