#! /usr/local/bin/ruby

(1975..2500).each do |f|
  file = "fort.#{f}"
  system "cat series.gp|sed -e \'s+INDEX+#{f}+\' > series.gp.#{f}"
  system "cat series.gp.#{f} |sed -e \'s+TIME+#{f-1000}+\' > series.gp.2-#{f}"
  system "gnuplot ./series.gp.2-#{f}"
  system "rm series.gp.2-#{f} series.gp.#{f}"
end
