Last change
on this file since 19879 was 18324, checked in by Daniela Dorner, 9 years ago |
cleanup
|
-
Property svn:executable
set to
*
|
File size:
847 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | source `dirname $0`/../Sourcefile.sh
|
---|
4 | printprocesslog "INFO starting $0 with option doupdate="$doupdate
|
---|
5 |
|
---|
6 | query="SELECT Concat(fNight, '_', LPAD(fRunId, 3, 0)) from RunInfo WHERE fFitsFileErrors=0 AND ISNULL(fFileSize)"
|
---|
7 | runs=( `sendquery` )
|
---|
8 |
|
---|
9 | printprocesslog ${#runs[@]}" runs to fill."
|
---|
10 |
|
---|
11 | for run in ${runs[@]}
|
---|
12 | do
|
---|
13 | year=`echo $run | cut -c 1-4`
|
---|
14 | month=`echo $run | cut -c 5-6`
|
---|
15 | day=`echo $run | cut -c 7-8`
|
---|
16 | file=$rawdata"/"$year"/"$month"/"$day"/"$run".fits.fz"
|
---|
17 | if ! [ -e $file ]
|
---|
18 | then
|
---|
19 | printprocesslog "DEBUG "$file" does not exist."
|
---|
20 | continue
|
---|
21 | fi
|
---|
22 | night=`echo $run | cut -d_ -f1`
|
---|
23 | runid=`echo $run | cut -d_ -f2`
|
---|
24 | size=`stat -c '%s' $file`
|
---|
25 | query="UPDATE RunInfo SET fFileSize="$size" WHERE fNight="$night" AND fRunID"=$runid
|
---|
26 | printprocesslog "INFO fill size ("$size") for file "$file
|
---|
27 | sendquery >/dev/null
|
---|
28 | done
|
---|
29 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.