source: trunk/DataCheck/Processing/CheckRawFilesAvail.sh@ 13263

Last change on this file since 13263 was 13153, checked in by Daniela Dorner, 13 years ago
treat case that file is not yet there
  • Property svn:executable set to *
File size: 780 bytes
Line 
1#!/bin/bash
2#
3
4source `dirname $0`/../Sourcefile.sh
5printprocesslog "INFO starting $0"
6program=CheckRawFilesAvail
7step=RawFileAvailISDC
8
9set -C
10
11# check if script is already running
12lockfile=$lockpath/lock-$program.txt
13checklock
14
15# get todo list
16gettodo
17
18
19for (( s=0 ; s < $num ; s++ ))
20do
21 night=${primaries[$s+$s]}
22 runid=${primaries[$s+$s+1]}
23
24 setstatus "start"
25
26 rawfile=$rawdata/`echo $night | cut -c 1-4`/`echo $night | cut -c 5-6`/`echo $night | cut -c 7-8`/$night"_"`printf %03d $runid`".fits.gz"
27 test -e $rawfile
28 check1=$?
29
30 case $check1 in
31 1) printprocesslog "WARN "$rawfile" missing."
32 check="no"
33 ;;
34 0) printprocesslog "INFO found rawfile "$rawfile
35 ;;
36 esac
37
38 setstatus "stop"
39done
40
41finish
42
Note: See TracBrowser for help on using the repository browser.