source: BOL/Multi_atlas/atlas/clean_cache.sh @ 4696

Last change on this file since 4696 was 3694, checked in by idelkadi, 4 years ago

Repository under svn of a first version of Multiatlas diagnostics for LMDZ. This version is adapted to be able to run a LMDZ multiatlas on an individual account on the ciclad machine of the IPSL. In this version, the parts to be modified are identified so as to subsequently adapt it to other machines.
Corrections.

  • Property svn:executable set to *
File size: 751 bytes
Line 
1#!/bin/bash
2
3DIRATLAS=$1
4
5cd $DIRATLAS
6
7i=1
8while [ -f block.clean ] ; do
9   echo Mise en attente du nettoyage pour 20s max si deja utilise
10   sleep 1
11   (( i = $i + 1 ))
12   echo clean en attente $i
13   if [ "$i" = "20" ] ; then exit ; fi
14done
15
16touch block.clean
17
18
19grep 'not well .*.no CRS' */climaf.log | sed -e 's/.*.file //' -e 's/ is not .*.$//' | sort > all.clean
20if [ ! -f old.clean ] ; then
21    cp all.clean tobe.clean
22else
23    # fichier corrompus absents au passage precedent :
24    diff all.clean old.clean | grep '^<' | sed -e 's/^<//' > tobe.clean
25fi
26
27for i in `cat tobe.clean` ; do
28   rm -f $i
29   echo rm -f $i
30done
31cp -f tobe.clean tobe$$.clean # pour memoire
32mv all.clean old.clean        # pour la prochaine iteration
33
34\rm -f block.clean
Note: See TracBrowser for help on using the repository browser.