Skip to content

Instantly share code, notes, and snippets.

@kylehowells
Forked from danielchasehooper/count.sh
Last active May 10, 2019 22:26
Show Gist options
  • Save kylehowells/6fcb0761a377166ef761 to your computer and use it in GitHub Desktop.
Save kylehowells/6fcb0761a377166ef761 to your computer and use it in GitHub Desktop.
#!/bin/sh
find . \( -iname "*.[chm]" -o -iname "*.swift" -o -iname "*.cpp" -o -iname "*.mm" -o -iname "*.xm" \) -print0 | xargs -0 cat | wc -l
@kylehowells
Copy link
Author

kylehowells commented Dec 8, 2016

For server side python projects

find . \( -iname "*.sh" -o -iname "*.html" -o -iname "*.js" -o -iname "*.css" -o -iname "*.py" -o -iname "*.conf" -o -iname "*.service" -o -iname "*.ini" -o -iname "*.md" \) -print0 | xargs -0 cat | wc -l

For Xamarin Projects (including everything)

find . \( -iname "*.[chm]" -o -iname "*.swift" -o -iname "*.cpp" -o -iname "*.mm" -o -iname "*.xm" -o -iname "*.cs" -o -iname "*.xaml" -o -iname "*.xml" -o -iname "*.json" -o -iname "*.sln" -o -iname "*.plist" -o -iname "*.csproj" -o -iname "*.config" -o -iname "*.xib" -o -iname "*.storyboard" -o -iname "*.resx" \) -print0 | xargs -0 cat | wc -l

For Xamarin Projects (C# only)

find . \( -iname "*.[chm]" -o -iname "*.cs" -o -iname "*.xaml" -o -iname "*.resx" \) -print0 | xargs -0 cat | wc -l

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