Skip to content

Instantly share code, notes, and snippets.

@mdigan
Created September 27, 2012 13:49
Show Gist options
  • Select an option

  • Save mdigan/3794106 to your computer and use it in GitHub Desktop.

Select an option

Save mdigan/3794106 to your computer and use it in GitHub Desktop.
Count all the lines of all the files in a directory
#!/bin/bash
find . -type f -exec wc -l {} \; | cut -f1 -d" " | awk '{a+=$0}END{print a}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment