Created
March 14, 2018 13:21
-
-
Save avimehenwal/7d45b2e49839dcc9f7f27215a54c0fb3 to your computer and use it in GitHub Desktop.
Reduce PDF Filesize
This file contains hidden or 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
for file in *.pdf; | |
do; | |
$(gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=c-$file $file); | |
echo "PROCESSED : $file"; | |
done |
Removing .pdf
for all filename
for file in *.pdf;
do
mv -v $file $(echo $file | sed 's/.\{4\}$//');
done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replacing last 4 chard for file