<p><b>dwj07@fsu.edu</b> 2012-12-04 11:57:28 -0700 (Tue, 04 Dec 2012)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Adding another method for replacing a subroutine in a file.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/temporal_convergence/makeMeshes.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/temporal_convergence/makeMeshes.sh        2012-12-04 18:05:37 UTC (rev 2340)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/temporal_convergence/makeMeshes.sh        2012-12-04 18:57:28 UTC (rev 2341)
@@ -135,7 +135,17 @@
 cp basin_src/* basin_checkout/.
 
 echo &quot;   Building Basin&quot;
+# SED METHOD FOR REPLACING A SUBROUTINE
 sed -ne '/subroutine get_init_conditions/ {p; r basin_src/get_init_conds.F' -e ':a; n; /end subroutine get_init_conditions/ {p; b}; ba}; p' basin_checkout/basin.F &gt; temp.F
+# BASH METHOD FOR REPLACING A SUBROUTINE
+TOTAL_LINES=`cat basin_checkout/basin.F | wc -l`
+BEGIN_LINE=`grep -n -e '^subroutine get_init_conditions' basin_checkout/basin.F | cut -d : -f 1`
+END_LINE=`grep -n -e '^end subroutine get_init_conditions' basin_checkout/basin.F | cut -d : -f 1`
+TAIL_LINES=`echo ${TOTAL_LINES} - ${END_LINE} + 1 | bc`
+
+head -n $BEGIN_LINE basin_checkout/basin.F &gt; temp.F
+cat basin_src/get_init_conds.F &gt;&gt; temp.F
+tail -n $TAIL_LINES basin_checkout/basin.F &gt;&gt; temp.F
 mv temp.F basin_checkout/basin.F
 
 if [ -a map ]; then

</font>
</pre>