#! /opt/bin/dash # PATH="/bin:/usr/bin"; export PATH export GDFONTPATH="/usr/share/fonts/open-sans" export GNUPLOT_DEFAULT_GDFONT="OpenSans-Semibold" if [ -z "$1" ]; then echo "Usage: ${0}: fname" 1>&2; exit 1 fi f="$1" echo "$f.log -> $f.out, $f.gif" title="BV $f" xlabel="qubits" ylabel="secs" labels="set title \"$title\"\nset xlabel \"$xlabel\"\nset ylabel \"$ylabel\"" egrep ', n = |^real ' "$f.log" | while read x1 x2 x3 x4 x5 x6 x7 rest do if read y1 y2; then echo "$x7 $y2" fi done | tee "$f.out" | (echo "set term gif\nset output\n $labels\nset logscale y\nplot '-' notitle with linespoints"; cat) | gnuplot > "$f.gif"