/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DPGAnalysis/Skims/python/archiveold
40 строк
840 B
Giulio Eulisse
Snapshot of CMSSW_6_2_0_pre8.
26 июн 2013, 18:12
26 июн 2013, 18:12
214ab73
Код
Авторство
О чём код?
#!/bin/sh if [ "$1" == "" ]; then echo "Usage: $0 <older than (sec)>" exit 1 fi ARCHDIR=archive current=`date +%s` olderthan=`expr $current - $1` echo $current $olderthan for file in `ls *SM*.root` do time=`echo $file | awk -F _ '{print $2}' | cut -c 1-10` if [ $time -le $olderthan ]; then echo "Moving file $file in $ARCHDIR" mv $file ${ARCHDIR}/ fi done for file in `ls SkimSM*.log` do time=`echo $file | awk -F _ '{print $2}' | cut -c 1-10` if [ $time -le $olderthan ]; then echo "Moving file $file in $ARCHDIR" mv $file ${ARCHDIR}/ fi done for file in `ls SkimSM*.py` do time=`echo $file | awk -F _ '{print $2}' | cut -c 1-10` if [ $time -le $olderthan ]; then echo "Moving file $file in $ARCHDIR" mv $file ${ARCHDIR}/ fi done # archive all ig files..... mv *.ig ${ARCHDIR}/