Skip to content

Instantly share code, notes, and snippets.

@JonasR
Created Aug 31, 2012
Embed
What would you like to do?
Convert plots to png
#!/bin/bash
for directory in `ls -d */`
do
cd $directory
for model in `ls | grep .eps`
do
MODELNAME=${model%.[^.]*}
MODELNAME=${model}
echo "Processing model 1: "$MODELNAME
# epstopdf --autorotate=All $MODELNAME
#gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -r300 -dORIENT1=true -sOutputFile=$MODELNAME.png $MODELNAME
convert -rotate 90 $MODELNAME $MODELNAME.png
done
cd ..
done
for directory in `ls -d */`
do
cd $directory
for model in `ls | grep .png`
do
MODELNAME=${model%.[^.]*}
MODELNAME=${model}
echo "Processing model 1: "$MODELNAME
# mv $MODELNAME ~/Arbeitsfläche/
done
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment