#! /usr/local/bin/perl

$start=$ARGV[0];
$stop =$ARGV[1];
#print "$arg is arg 1\n";

open(IN,"fort.1.run1");
open(OUT,">window.dat");
$started=0;

while(<IN>) {
       if ($started==1){
       print;
	}
       if(/$start/){
       $started=1;
#	print "STARTS---\n";
	print; 
	}
       if(/$stop/){
       $started=0;
	print "- - - - - - - - - - - - - -\n";
	}

}
close(OUT);
close(IN);
