Friday, March 30, 2007

Script Foo

In case you want to convert a bunch of eps-files to pdf-files (e.g. root generated plots, as the pdf output of root sucks and the eps sometimes produce strange encoding-effects when converted directly...):


#!/bin/bash
for epsfile in $*;
do
echo "Converting $epsfile ...";
eps2eps $epsfile ${epsfile%.eps}_temp.eps;
epstopdf ${epsfile%.eps}_temp.eps -o=${epsfile%.eps}.pdf;
rm ${epsfile%.eps}_temp.eps;
done

No comments: