Changeset 8410 for trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
- Timestamp:
- 04/17/07 16:05:32 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles ¶
r8331 r8410 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 622 # Copyright: MAGIC Software Development, 2000-2007 23 23 # 24 24 # … … 49 49 50 50 printprocesslog "INFO moving directories from fromlapalma to fromtape" 51 # find directories which have to be copied51 # find directories which have to be copied 52 52 dirs=`ls /magic/datacenter/fromlapalma/RAWchk/*/*.finished | sed -e 's/RAWchk/RAW/g' | cut -d/ -f1-6` 53 53 if [ ! "$dirs" == "" ] 54 54 then 55 # change permission for this dir ctories55 # change permission for this directories 56 56 ssh lapalma@apollo chmod -R g+w $dirs >> $scriptlog 2>&1 57 57 # move directories to the tapedirectory 58 mv -v $dirs /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1 58 mv -v $dirs /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1 59 fi 60 61 printprocesslog "INFO moving directories from muxdata to rawdata" 62 # find directories which have to be copied 63 days=`find /magic/datacenter/fromtape/muxdata/* -type d` 64 if [ ! "$days" == "" ] 65 then 66 # move directories to the tapedirectory 67 mv -v $days /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1 59 68 fi 60 69 … … 65 74 if [ "$rawfiles" == "" ] 66 75 then 67 echo "no files to move -> exit" >> $scriptlog 2>&1 68 finish >> $scriptlog 2>&1 76 echo "no files to move -> exit" >> $scriptlog 2>&1 77 finish >> $scriptlog 2>&1 69 78 fi 70 79 71 printprocesslog "INFO moving movingrawfiles to $datapath/rawfiles"80 printprocesslog "INFO moving rawfiles to $datapath/rawfiles" 72 81 for rawfile in $rawfiles 73 82 do 74 83 # workaround for rawfiles with wrong timing 75 # newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles-wrong-timing/g' -e 's/_/\//1' -e 's/_/\//1'`84 # newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles-wrong-timing/g' -e 's/_/\//1' -e 's/_/\//1'` 76 85 newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'` 77 86 newdir=`dirname $newrawfile` 78 makedir $newdir >> $scriptlog 2>&1 87 makedir $newdir >> $scriptlog 2>&1 79 88 80 mv -v $rawfile $newrawfile >> $scriptlog 2>&1 89 mv -v $rawfile $newrawfile >> $scriptlog 2>&1 81 90 done 82 91 83 rmdir -v /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&1 92 rmdir -v /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&1 84 93 85 94 printprocesslog "INFO launching filesondisk" 86 echo "launching filesondisk" >> $scriptlog 2>&1 95 echo "launching filesondisk" >> $scriptlog 2>&1 87 96 $scriptspath/filesondisk& 88 97
Note:
See TracChangeset
for help on using the changeset viewer.