Last active
August 29, 2015 14:02
-
-
Save yorkie/7131afa5a6e9162afdda to your computer and use it in GitHub Desktop.
my-code-lines.awk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this awk script just count the effective lines of your source codes | |
/^.+$/ { | |
plus(count) | |
} | |
/^{/ { | |
minus(count) | |
} | |
/#/ { | |
minus(count) | |
} | |
function plus(count) { | |
count += 1 | |
print count | |
} | |
function minus(count) { | |
count -= 1 | |
print count | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment