#!/bin/bash #Script written for quickly making pdf to ps files using the command pdf2ps (required!) #Options are -s (Shows which files are converted) -r removes the pdf files afterwards #Created by Tue Christensen, tuechristensen@gmail.com while getopts "sr" OPTION do case $OPTION in s)SHOW=true;; r)DELETE=true;; *)echo "Not recognized argument"; esac done for x in *.pdf do $(pdf2ps $x) if [ "$SHOW" = "true" ]; then echo "$x has been ps'ed" fi if [ "$DELETE" = "true" ]; then $(rm $x) fi done