Skip to content

Instantly share code, notes, and snippets.

@sasasin
Created November 27, 2012 15:27
Show Gist options
  • Save sasasin/4154801 to your computer and use it in GitHub Desktop.
Save sasasin/4154801 to your computer and use it in GitHub Desktop.
JPEGを集約して作成したPDFから、JPEG画像を抽出するシェルスクリプト。
#!/bin/sh
ls "$@" | while read f; do
DIRNAME=$(basename "$f" ".pdf")
echo "converting $f to $DIRNAME"
rm -rf "$DIRNAME"
mkdir "$DIRNAME"
pdfimages -j "$f" "$DIRNAME"/"DIRNAME"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment