#!/bin/bash cd /prodigfs/ipslfs/dods/fabric/lmdz/atlas i=1 while [ -f block.clean ] ; do echo Mise en attente du nettoyage pour 20s max si deja utilise sleep 1 (( i = $i + 1 )) echo clean en attente $i if [ "$i" = "20" ] ; then exit ; fi done touch block.clean grep 'not well .*.no CRS' */climaf.log | sed -e 's/.*.file //' -e 's/ is not .*.$//' | sort > all.clean if [ ! -f old.clean ] ; then cp all.clean tobe.clean else # fichier corrompus absents au passage precedent : diff all.clean old.clean | grep '^<' | sed -e 's/^ tobe.clean fi for i in `cat tobe.clean` ; do rm -f $i echo rm -f $i done cp -f tobe.clean tobe$$.clean # pour memoire mv all.clean old.clean # pour la prochaine iteration \rm -f block.clean