Skip to content

Instantly share code, notes, and snippets.

@TonnyXu
Created August 29, 2011 06:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TonnyXu/1177857 to your computer and use it in GitHub Desktop.
Save TonnyXu/1177857 to your computer and use it in GitHub Desktop.
Count lines of source code files
wc -l `find . -type f \( -name "*.h" -or -name "*.m" \)`
@TonnyXu
Copy link
Author

TonnyXu commented Aug 29, 2011

If we swap the order of wc and find command, we can get almost a same result, but a little different that find . -type f \( -name "*.h" -or -name "*.m" \) -exec wc -l {} \; will not print the total result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment