Skip to content

Instantly share code, notes, and snippets.

@revolunet
Created August 18, 2011 19:21
Show Gist options
  • Select an option

  • Save revolunet/1154920 to your computer and use it in GitHub Desktop.

Select an option

Save revolunet/1154920 to your computer and use it in GitHub Desktop.
count number of lines in folder recursively
#!/bin/sh
find . -type f -exec wc -l "{}" \; | awk ' { sum += $1 } END {print sum}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment