#! /opt/bin/dash # PATH="/bin:/usr/bin"; export PATH export GDFONTPATH="/usr/share/fonts/open-sans" export GNUPLOT_DEFAULT_GDFONT="OpenSans-Semibold" title="BV MPI cache size C=2**c, 4 nodes, 31 qubits" xlabel="c bits" ylabel="secs" labels="set title \"$title\"\nset xlabel \"$xlabel\"\nset ylabel \"$ylabel\"" egrep '^(nx =|c =|real )' cache-30.log | while read x1 x2 x3 do case "$x1" in nx) nx="$x3"; n=$((nx+1));; c) c="$x3";; real) t="$x2"; printf "%2i %2i %g\n" $n $c $t;; esac done | tee cache-30.out | (echo "set term gif\nset output\n$labels\nplot '-' using 2:3 notitle with linespoints"; cat) | gnuplot > "cache-30.gif"