Skip to content

Instantly share code, notes, and snippets.

@emres
Created September 10, 2013 09:51
Show Gist options
  • Save emres/6507262 to your computer and use it in GitHub Desktop.
Save emres/6507262 to your computer and use it in GitHub Desktop.
Finds the .java or .xml files in the ~/dev and prints the number of lines, excluding lines with blanks.
find ~/dev -regextype posix-egrep -iregex ".*(java|xml)" -print0 | xargs -0 -I sourceFile sed '/^[ \t]*$/d' sourceFile | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment