for fname in *.dot; do bname=$(basename $fname .dot) #echo $fname $bname dot -Tsvg $fname -o $bname.svg dot -Tpng $fname -o $bname.png done