1 2 3 4 5 6 7
#! /bin/bash for data in ./data/*; do echo "draw $data …" cat $data | sed -e '1agraph G {' -e '1d; s/ / -- /; s/$/;/' -e '$a}' | dot -Tpng -o ${data}.png done