Changeset 18694 for trunk/DataCheck/Sourcefile.sh
- Timestamp:
- 12/18/16 23:46:07 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Sourcefile.sh
r18668 r18694 127 127 # alias (we cannot check the beginning of the line due to 128 128 # color codes in filldotraw.C) 129 alias 'intgrep'='grep -E -o \\\( int\\\)[0-9]+$ | grep -E -o [0-9]+'129 alias 'intgrep'='grep -E -o \\\("(int|Bool_t)"\\\)[0-9]+$ | grep -E -o [0-9]+' 130 130 131 131 … … 168 168 { 169 169 db=`grep Database $sqlrc | grep -v '#' | sed -e 's/Database: //' -e 's/ //g'` 170 pw= `grep Password $sqlrc | grep -v '#' | sed -e 's/Password: //' -e 's/ //g'`170 pw="--password="`grep Password $sqlrc | grep -v '#' | sed -e 's/Password: //' -e 's/ //g'` 171 171 us=`grep User $sqlrc | grep -v '#' | sed -e 's/User: //' -e 's/ //g'` 172 172 ho=`grep URL $sqlrc | grep -v '#' | sed -e 's/ //g' -e 's/URL:mysql:\/\///'` 173 if [ "$sqlpw" != "" ] 174 then 175 pwfile="--defaults-file=$sqlpw" 176 pw="" 177 fi 173 178 # echo "setup: " 174 179 # echo " db: "$db … … 183 188 getdbsetup 184 189 printprocesslog "DEBUG sendquery QUERY: "$query 185 if ! val=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "`190 if ! val=`mysql $pwfile -s -u $us $pw --host=$ho $db -e " $query "` 186 191 then 187 192 printprocesslog "ERROR could not query DB "$db" on host "$ho" with user "$us … … 341 346 # execute query 342 347 #numproc=`sendquery `#cannot be done with sendquery, because of row counting 343 if ! numproc=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query " | wc -l`348 if ! numproc=`mysql $pwfile -s -u $us $pw --host=$ho $db -e " $query " | wc -l` 344 349 then 345 350 printprocesslog "ERROR could not query number of processes from db (program: $program, function getstatus)"
Note:
See TracChangeset
for help on using the changeset viewer.