Skip to content

Instantly share code, notes, and snippets.

View Paretzky's full-sized avatar

Ben Paretzky

  • SUNY Oswego
  • Oswego, NY
View GitHub Profile
@Paretzky
Paretzky / gist:4978714
Created February 18, 2013 16:46
Set/List of LaTeX packages used by *tex files in the current directory
find . -iname "*tex" -exec grep usepackage {} + | grep -Po "{[^}]+}$" | grep -oP "[^{|}]+" | sort -u
@Paretzky
Paretzky / gist:4105017
Created November 18, 2012 12:36
Total the Number of Pages in All Pdf's in the Current Directory Recursively
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