<p><b>dwj07@fsu.edu</b> 2012-03-08 08:58:26 -0700 (Thu, 08 Mar 2012)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Improving compatibility with mac versions of head and tail.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh        2012-03-07 23:27:50 UTC (rev 1604)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh        2012-03-08 15:58:26 UTC (rev 1605)
@@ -13,12 +13,13 @@
# REPOSITORY_ADDRESS="https://svn-mpas-model.cgd.ucar.edu/trunk/mpas --username user --password pass"
REPOSITORY_ADDRESS="https://svn-mpas-model.cgd.ucar.edu/trunk/mpas"
+REPOSITORY_ADDRESS="https://svn-mpas-model.cgd.ucar.edu/branches/ocean_projects/monotonic_advection"
COMPILE_SET="gfortran"
MACHINE_NAME="lobo"
MACHINE_PPN="16"
SUBMISSION_CMD=msub
PROC_LIST="2 4 8 16 32 64 128 256 512 1024 2048 4096"
-PROC_LIST="2 4 8"
+PROC_LIST="4"
########################
## Script starts here ##
@@ -57,7 +58,9 @@
        cd ..
        ## Make a variable containing the make options used to build mpas
-        MAKE_OPTS=`sed -n "/${COMPILE_SET}:/,/:/p" mpas/Makefile | head -n -2 \
+        NUM_LINES=`sed -n "/${COMPILE_SET}:/,/:/p" mpas/Makefile | tail -n +2 | wc -l`
+        NUM_LINEA=`echo "${NUM_LINES}-2" | bc`
+        MAKE_OPTS=`sed -n "/${COMPILE_SET}:/,/:/p" mpas/Makefile | head -n ${NUM_LINES} \
                 | grep "_PARALLEL" -v | grep "_DEBUG" -v | sed "s/FC_SERIAL/SFC/g" \
                 | sed "s/CC_SERIAL/SCC/g" | sed "s/_OPT//g" | grep "SERIAL" -v \
                 | grep "DEBUG" -v | grep "USE_PAPI" -v | tail -n +2`
@@ -66,7 +69,7 @@
        ## revision the run was performed from
        echo "Compile flags:" >> .run_info
        echo "$COMPILE_SET:" >> .run_info
-        sed -n "/${COMPILE_SET}:/,/:/p" mpas/Makefile | head -n -2 | tail -n +2 >> .run_info
+        sed -n "/${COMPILE_SET}:/,/:/p" mpas/Makefile | head -n ${NUM_LINES} | tail -n +2 >> .run_info
        echo "" >> .run_info
        echo "Checkout path:" >> .run_info
        echo "$REPOSITORY_ADDRESS" >> .run_info
</font>
</pre>