Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.eso.org/~qc/monitor/REPROC/clean_status
Дата изменения: Fri May 24 12:34:30 2013
Дата индексирования: Fri Feb 28 11:49:57 2014
Кодировка:
#!/bin/sh
# this is a helper tool to bring the old status pages (created on dfo03 and dfo13)
# to the content of this UVESR_1 tree; the broken links should be fixed by this.
# created 2013-05-23 by R. Hanuschik
# $1: month, e.g. 2007-03
# all dates:
# for M in `ls -d 200*/*`; do M1=`echo $M | sed "s|/| |" | awk '{print $2}'`; ./clean_status -m $M1; done

OLD_URL1="/data13/data"
OLD_URL1b="/data03/uvesr"
OLD_URL2="/home/uvesr/gui"
OLD_URL3="/home/uvesr/monitor"
OLD_URL4="/home/uvesr/AB"
OLD_URL5="/data13/dfs_log"
OLD_URL6="/data13/dfs_product/SCI_POINT_ECH_RED"
OLD_URL6b="/data13/dfs_product/SCI_POINT_ECH_BLUE"

NEW_URL1="http://qcweb/~qc/UVESR_1"
NEW_URL2="/qc/ALL/img"
NEW_URL3="."
NEW_URL4="see below"
NEW_URL5="see below"
NEW_URL6="http://qcweb/~qc/UVESR_1/post"

if [ $1 = -m ] && [ Q$2 != Q ]
then
MONTH=$2
YEAR=`echo $MONTH | cut -c1-4`
cd $YEAR/$MONTH
DAY=1
while [ $DAY -lt 32 ]
do
if [ $DAY -lt 10 ]
then
../../clean_status -d ${MONTH}-0$DAY
else
../../clean_status -d ${MONTH}-$DAY
fi
DAY=`echo $DAY | awk '{print $1+1}'`
done
exit
fi

if [ $1 = -d ] && [ Q$2 != Q ]
then
DAY=$2
if [ ! -s status_$DAY.html ]
then
echo " $DAY not found"
exit
fi
echo $DAY
NEW_URL4="http://qcweb/~qc/UVESR_1/logs/$DAY"
NEW_URL5="http://qcweb/~qc/UVESR_1/logs/$DAY"

sed -i -e "s|${OLD_URL1}|${NEW_URL1}|"g status_$DAY.html
sed -i -e "s|${OLD_URL1b}|${NEW_URL1}|"g status_$DAY.html
sed -i -e "s|${OLD_URL2}|${NEW_URL2}|"g status_$DAY.html
sed -i -e "s|${OLD_URL3}|${NEW_URL3}|"g status_$DAY.html
sed -i -e "s|${OLD_URL4}|${NEW_URL4}|"g status_$DAY.html
sed -i -e "s|${OLD_URL5}|${NEW_URL5}|"g status_$DAY.html
sed -i -e "s|${OLD_URL6}|${NEW_URL6}|"g status_$DAY.html
sed -i -e "s|${OLD_URL6b}|${NEW_URL6}|"g status_$DAY.html
sed -i -e "/sort/s|#FFFFFF|#CCCCCC|"g status_$DAY.html
sed -i -e "s/AB monitor/UVESR_1 processing monitor/" status_$DAY.html
sed -i -e "s/instrument: UVES, //" status_$DAY.html
sed -i -e "/reproMonitor/s||histo|" status_$DAY.html

sed -i -e "/last DAG directory:/d" status_$DAY.html
sed -i -e "/condor\/SCIENCE_/d" status_$DAY.html

sed -i -e "/help for this page/d" status_$DAY.html
sed -i -e "/edit config file/d" status_$DAY.html
sed -i -e "/dfos tools/s|||" status_$DAY.html

# rare
sed -i -e "/dfoMonitor/s|title=\"DFO.*html|title=\"histoMonitor\" href=\"../../reproc.html|" status_$DAY.html
sed -i -e "s|DFO|histo|" status_$DAY.html
sed -i -e "/call pgi_getStatusAB/d" status_$DAY.html
sed -i -e "/refresh this page/d" status_$DAY.html
fi

exit