src/utils/qa/retirePushQ.csh 1.11
1.11 2010/05/13 00:09:58 galt
dealing with tcsh number handling for leading zeros
Index: src/utils/qa/retirePushQ.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/retirePushQ.csh,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -B -U 4 -r1.10 -r1.11
--- src/utils/qa/retirePushQ.csh 11 Apr 2009 00:43:16 -0000 1.10
+++ src/utils/qa/retirePushQ.csh 13 May 2010 00:09:58 -0000 1.11
@@ -40,14 +40,16 @@
exit 1
endif
echo "backed up $1 ok."
-set maxqid = `hgsql $hhost qapushq -B --skip-column-names -e "select max(qid) from pushQ"`
+# tcsh is now treating numbers with leading zeros as octal, the most useless thing ever.
+# have to add +0 to convert to number trimming off leading zeros.
+set maxqid = `hgsql $hhost qapushq -B --skip-column-names -e "select max(qid)+0 from pushQ"`
echo "maxqid = $maxqid"
#@ x = $res + 1
#echo $x
-set minqid = `hgsql $hhost qapushq -B --skip-column-names -e "select min(qid) from $1"`
+set minqid = `hgsql $hhost qapushq -B --skip-column-names -e "select min(qid)+0 from $1"`
echo "minqid = $minqid"
@ maxqid = ($maxqid - $minqid) + 1
echo "adjusted maxqid=$maxqid"