Skip to content

Instantly share code, notes, and snippets.

@peiyunh
Created March 5, 2017 22:12
Show Gist options
  • Save peiyunh/1575f429a5b4c944332b5869a032ca09 to your computer and use it in GitHub Desktop.
Save peiyunh/1575f429a5b4c944332b5869a032ca09 to your computer and use it in GitHub Desktop.
files=`ls val/*/*.pdf`
for f in $files; do
fnew=${f//.pdf/_crop.pdf}
if [ ! -f $fnew ]; then
pdfcrop --noverbose $f $fnew
echo "$f done"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment