I'm assuming that all of plots are identical.
First you need to set up a template file containg the command for gnuplot like this.
# template.gnuplot
set term png
set output "OUTFILE"
plot "DATAFILE" using 1:2 with lines \
"DATAFILE" using 1:3 with lines
Now you can plot the datafiles. This script will loop from 1 to 10, modifying the gnuplot command file on each iteration.
# Plotting.sh
#!/bin/bash
tmpfile=/tmp/temp.$$
touch $tmpfile
x=1
while [ $x -le 10 ]
do
sed '
s/DATAFILE/output'${x}'.txt/
s/OUTFILE/graph'${x}'.png/' template.gnuplot # > $tmpfile
gnuplot $tmpfile
x=$((x + 1))
done
rm /tmp/temp.$$
shibblez
Junior Poster in Training
73 posts since Oct 2010
Reputation Points: 15
Solved Threads: 6
Skill Endorsements: 0