src/utils/qa/getMonthLastYear.csh 1.4
1.4 2009/04/11 00:37:03 rhead
Sourced new qaConfig file at the top. Changed -h hgwbeta lines to look for sql host stored in a variable, specified in the new qaConfig file.
Index: src/utils/qa/getMonthLastYear.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/getMonthLastYear.csh,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -B -U 1000000 -r1.3 -r1.4
--- src/utils/qa/getMonthLastYear.csh 9 Oct 2007 19:34:41 -0000 1.3
+++ src/utils/qa/getMonthLastYear.csh 11 Apr 2009 00:37:03 -0000 1.4
@@ -1,48 +1,49 @@
#!/bin/tcsh
+source `which qaConfig.csh`
#######################
#
# 09-17-07
# gets year and month of month last year
#
# Robert Kuhn
#
#######################
set go=""
set year=""
set yearMonth=""
set lastyear=""
if ( $#argv != 1 ) then
echo
echo " gets year and month of month last year"
echo
echo " usage: go"
echo
exit 1
else
if ( $argv[1] != "go" ) then
echo
echo ' argument can only be "go"'
$0
exit 1
endif
endif
# find same month last year
set year=`date +%Y`
set yearMonth=`date +%Y-%m`
set lastyear=`echo $year | awk '{print $1-1}'`
set lastYearMonth=`echo $yearMonth | sed -e "s/$year/$lastyear/"`
# echo "year $year"
# echo "lastyear $lastyear"
# echo "yearMonth $yearMonth"
echo $lastYearMonth
exit