Skip to content

Instantly share code, notes, and snippets.

@zmcghee
Created April 24, 2017 13:31
Show Gist options
  • Save zmcghee/1cfae72a143e760a0f96535ceaab905c to your computer and use it in GitHub Desktop.
Save zmcghee/1cfae72a143e760a0f96535ceaab905c to your computer and use it in GitHub Desktop.
# Recursively find EPS files and convert them to PDF
find . -type f -name '*.eps' -print0 | while IFS= read -r -d '' file; do
pstopdf "$file"
done
# Recursively find PDF files and convert them to EPS
find . -type f -name '*.pdf' -print0 | while IFS= read -r -d '' file; do
sips -s format png --deleteColorManagementProperties --out "${file}.png" "$file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment