src/utils/qa/getRRtables.csh 1.7
1.7 2010/01/28 00:36:16 ann
variable needed quoting
Index: src/utils/qa/getRRtables.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/getRRtables.csh,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -B -U 1000000 -r1.6 -r1.7
--- src/utils/qa/getRRtables.csh 22 Jan 2010 21:17:18 -0000 1.6
+++ src/utils/qa/getRRtables.csh 28 Jan 2010 00:36:16 -0000 1.7
@@ -1,84 +1,84 @@
#!/bin/tcsh
source `which qaConfig.csh`
################################
# 10-12-04
# gets the names of all tables from an RR database
# using mark's genbank dumps.
#
# Robert Kuhn
################################
set database=""
set rootpath="/cluster/data/genbank/var/tblstats" # mark's TABLE STATUS dump
set mach1=""
set dirname1=""
set machpath1=""
set fullpath1=""
set debug="true"
set debug="false"
if ($#argv != 2) then
echo
echo " gets the names of all tables from an RR database"
echo " using mark's genbank dumps."
echo " warning: not in real time. uses overnight dump."
echo
echo " usage: RRmachine database"
echo
exit
else
set mach1=$argv[1]
set database=$argv[2]
endif
# check for valid machines
if ( $mach1 == hgwdev || $mach1 == hgwbeta ) then
echo
echo " this is for RR nodes only."
echo " usage: RRmachine, database"
echo
exit 1
else
echo $mach1 | egrep "hgw1|hgw2|hgw3|hgw4|hgw5|hgw6|hgw7|hgw8|rr|mysqlrr" \
> /dev/null
if ( ! $status ) then
set machpath1=$rootpath/hgnfs1
endif
endif
-if (! -e $machpath1 ) then
+if (! -e "$machpath1" ) then
echo
echo " $mach1 is not a valid machine"
echo
exit 1
endif
# set paths to stored TABLE STATUS dumps
set dirname1=`ls -ogtr $machpath1 | tail -1 | gawk '{print $7}'`
set fullpath1=$machpath1/$dirname1
if ($debug == "true") then
echo
echo "mach1 $mach1"
echo
echo "machpath1 $machpath1"
echo "dirname1 $dirname1"
echo "fullpath1 $fullpath1"
echo
# exit
endif
# get the tablenames from Mark's TABLE STATUS dump
if (! -e $fullpath1/$database.tbls) then
echo
echo " $database is not a valid database on $mach1"
echo
else
cat $fullpath1/$database.tbls | grep -v "Name" | \
gawk '{print $1}' | sort
endif