2a46f8c53b9891692305f70adfcdb6f8c3b7297c kuhn Thu Sep 9 08:29:37 2010 -0700 fixed a small bug diff --git src/utils/qa/getLastMonth.csh src/utils/qa/getLastMonth.csh index 7526c99..108894f 100755 --- src/utils/qa/getLastMonth.csh +++ src/utils/qa/getLastMonth.csh @@ -17,7 +17,7 @@ if ( $#argv != 1 ) then echo - echo " gets year and month of last month." + echo " gets year and month of last/prev month." echo echo " usage: go | YYYY-MM" echo @@ -34,7 +34,11 @@ endif endif -if ( $month > 12 ) then +# for some reason, 08 and 09 make the if statement barf, so drop zero +set month=`echo $month | sed "s/^0//"` +# echo "month = $month" + +if ( $month > 12 || $month < 1 ) then echo "\n error. month out of range.\n" exit 1 endif