Skip to content

Instantly share code, notes, and snippets.

@kylesluder
Created February 7, 2013 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylesluder/4734306 to your computer and use it in GitHub Desktop.
Save kylesluder/4734306 to your computer and use it in GitHub Desktop.
diffcount () {
awk '
BEGIN { minuscount=0; pluscount=0; }
/^-/ { minuscount = minuscount + 1; }
/^\+/ { pluscount = pluscount + 1; }
END { print "-" minuscount, "+" pluscount; }
'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment