source: trunk/MagicSoft/Mars/datacenter/scripts/dunotseqruns@ 9157

Last change on this file since 9157 was 8380, checked in by hoehne, 18 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 553 bytes
Line 
1#!/bin/sh
2#
3
4query="select concat('/magic/data/rawfiles', Date_Format(adddate(fRunStart, interval 12 HOUR), '/%Y/%m/%d/'),'*', fRunNumber, '*.raw.gz') from RunData where fSequenceFirst='0' and fRunStart > '2004-08-20'"
5
6files=`mysql -u MAGIC --host=vela --password=d99swMT! MyMagic -s -e " $query"`
7
8sum=0
9
10for file in $files
11do
12 name=`basename $file`
13 dir=`dirname $file`
14 num=`find $dir -name $name -printf '%k '`
15 if [ "$num" = "" ]
16 then
17 echo "num is empty for $file"
18 continue
19 fi
20 sum=`expr $sum + $num`
21done
22echo $sum
23
Note: See TracBrowser for help on using the repository browser.