#!/bin/sh cd /p/projects/best/fred/HavelSwim/STARS/RCP85_1/output i=2005 rm year touch year while [ $i -le 2099 ] do echo $i echo $i >> year i=`expr $i + 1` done rm Res_all_annual1 touch Res_all_annual1 for i in `cat inResPath` do echo echo "Now simulating scenario $i" cd $i awk {'print $13'} bay.prn > da cd .. paste Res_all_annual1 $i/da > out1 mv out1 Res_all_annual1 done paste year Res_all_annual1 > out2 csplit out2 2 mv xx01 Res_all_annual1 cd /p/projects/best/fred/HavelSwim/STARS/project/output rm year touch year i=1950 while [ $i -le 2005 ] do echo $i echo $i >> year i=`expr $i + 1` done rm Res_all_annual2 touch Res_all_annual2 for i in `cat inResPath` do echo echo "Now simulating scenario $i" cd $i awk {'print $13'} bay.prn > da cd .. paste Res_all_annual2 $i/da > out1 mv out1 Res_all_annual2 done paste year Res_all_annual2 > Res_all_annual2_ cat /p/projects/best/fred/HavelSwim/STARS/project/output/Res_all_annual2_ /p/projects/best/fred/HavelSwim/STARS/RCP85_1/output/Res_all_annual1 > Res_all_annual_AET_EPI_150y