Skip to content

Instantly share code, notes, and snippets.

@yorkie
Last active August 29, 2015 14:02
Show Gist options
  • Save yorkie/7131afa5a6e9162afdda to your computer and use it in GitHub Desktop.
Save yorkie/7131afa5a6e9162afdda to your computer and use it in GitHub Desktop.
my-code-lines.awk
# 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