Skip to content

Instantly share code, notes, and snippets.

@nowke
Last active May 19, 2016 13:47
Show Gist options
  • Save nowke/20e809b6a18441ad285407e5cebe46c5 to your computer and use it in GitHub Desktop.
Save nowke/20e809b6a18441ad285407e5cebe46c5 to your computer and use it in GitHub Desktop.
Shell script manipulation - Collection
#!/bin/bash
for file in ~/Pictures/Lex/*.png; do
convert "$file" -rotate 270 "${file%.png}"_rotated.png
done
#!/bin/bash
# Shrink PDF shell command
gs -sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 \
-dPDFSETTINGS=/screen \
-dNOPAUSE \
-dQUIET \
-dBATCH \
-sOutputFile="output.pdf" \
"input.pdf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment