Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Paretzky

  • SUNY Oswego
  • Oswego, NY
View GitHub Profile
@Paretzky
Paretzky / gist:4105017
Created Nov 18, 2012
Total the Number of Pages in All Pdf's in the Current Directory Recursively
View gist:4105017
find . -type f -iname "*pdf" | xargs -0 -d "\n" -n 1 pdfinfo 2> /dev/null | grep Pages | grep -Eo "[[:digit:]]+" | tr "\n" "+" | grep -Eo "[[:digit:]]+(\+[[:digit:]]+)+" | bc
You can’t perform that action at this time.