#!/usr/bin/bash
startline=$(grep -n "L2=  0" chuckoutput.dat | cut -d: -f1 | tail -n 1 )
echo $startline
stopline=$(grep -n "Subroutine X" chuckoutput.dat | cut -d: -f1)
echo $stopline
stopline=$((stopline-1))
echo $stopline
numberlines=$((stopline-startline))
echo $numberlines
numberlines=$((numberlines+1))
head -n $stopline chuckoutput.dat | tail -n $numberlines | cut -c 7- > fort.2

