Created
April 24, 2020 22:52
-
-
Save metric-space/1b053f9d1200c29f4cf32ad66c92332b to your computer and use it in GitHub Desktop.
personal bash script to move pdfs of a certain page count to a folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls | grep -i .pdf | while read -r line ; do | |
egg=$(pdfinfo "$line" | grep Pages | sed 's/[^0-9]*//') | |
if [ $egg -gt 20 ]; then | |
echo "Processing $line with $egg" | |
mv "$line" BOOKS | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment