#!/bin/bash all=all.temp; plot() { gnuplot < 10000) for (i = 1; i <= n; i += int(n/10000)) print i,array[i,1],array[i,2]; else for (i = 1; i <= n; i++) print i,array[i,1],array[i,2]; } ' $file > $name; done plot; rm *-2D*;