Skip to content

Instantly share code, notes, and snippets.

@apeckham
Created July 27, 2024 22:40
Show Gist options
  • Save apeckham/791809b787fec9de276ee3fd12b5de6a to your computer and use it in GitHub Desktop.
Save apeckham/791809b787fec9de276ee3fd12b5de6a to your computer and use it in GitHub Desktop.
sum of PDF page count on mac
find . -maxdepth 1 -name "*.pdf" -exec mdls -name kMDItemNumberOfPages {} \; | awk '/kMDItemNumberOfPages/ {sum += $3} END {print sum}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment