1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/bash ( if [ $# -eq 1 ]; then echo "set xrange [0:$1]" fi if [ $# -eq 2 ]; then echo "set xrange [$1:$2]" fi echo "plot 'spikes.out' using 1:2 with dots" ) | gnuplot -persist