Skip to content

Instantly share code, notes, and snippets.

@JJL772
Created September 8, 2020 04:38
Show Gist options
  • Save JJL772/5fff8616d7106dbf09baa7d5b7165af2 to your computer and use it in GitHub Desktop.
Save JJL772/5fff8616d7106dbf09baa7d5b7165af2 to your computer and use it in GitHub Desktop.
list lines of code in directory and stuff. only for C++
function sloc()
{
(find $1 -type f \( -iname "*.cpp" -o -iname "*.h" -o -iname "*.hpp" -o -iname "*.cc" -o -iname "*.hxx" -o -iname "*.c" \) -print0 | xargs -0 cat) | wc -l
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment