Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 7th, 2008 | Syntax: Bash | Size: 0.24 KB | Hits: 17 | Expires: Never
Copy text to clipboard
  1. #!/bin/bash
  2. while test $# -gt 0 ; do
  3.         case $1 in
  4.         *.pdf)
  5.                 gs -dNOPAUSE -dNOCACHE -dBATCH \
  6.                         -sDEVICE=epswrite -sOutputFile=${1%.pdf}.eps $1
  7.                 ;;
  8.         *)
  9.                 echo "File $1 not recognised, skipping"
  10.                 ;;
  11.         esac
  12.         shift
  13. done
  14. # end of script.