#!/bin/bash if [ -f "performance.out" ]; then echo "x=load('performance.out'); x=(x > 1); y=length(x); p=zeros(y-100,1); for i=1:(y-100) p(i)=mean(x(i:(i+100),1)); end p" \ | octave -q \ | tr -dc "0123456789.\n" \ |grep -v "^$" \ > performance.out.sliding-avg PWD=`pwd` echo "set title 'performance (sliding avg, window size 100) $PWD' set terminal postscript set output 'performance.out.ps' plot 'performance.out.sliding-avg' using 1 with lines, 0.5" \ | gnuplot fi