source: TOOLS/SURPACK_IPSL/create_listing.sh @ 3624

Last change on this file since 3624 was 2136, checked in by acosce, 11 years ago

add new tools allows packing simulation alreaddy pack (so pack with a bigger frequency)

File size: 1.9 KB
Line 
1#!/bin/bash
2
3#cree le listing du repertoire REPtoLISTE ($1)
4#exemple REPtoList=/dmnfs09/cont003/p86cadul/IGCM_OUT
5
6REPtoList=$1
7
8EXE_DIR=$(dirname ${0})
9SCRIPT_NAME=$(basename ${0} )
10export IGCM_DEM=${IGCM_DEM:-${SCRATCHDIR}/IGCM_DEM}
11export IGCM_TMP=${IGCM_TMP:-${IGCM_DEM}/tmp}
12
13source ${EXE_DIR}/DEM_utilities.sh
14
15# gpdebug : verif si le present script a ete execute jusqu'au bout, sinon on sort #########
16createListingMonitoring_Check "$REPtoList"
17
18DEM_log -0 "Demarrage de ${SCRIPT_NAME}"
19
20# gpdebug : on augmente la liste des proc à détruire en cas d'erreur bloquante du présent proc
21export listPID="$$ ${listPID}" #########
22
23echo "gpdebug : REPtoList=$REPtoList" # gpdebug : a virer
24find $REPtoList -printf "%y %s %p \n" >> ${IGCM_DEM}/Listing.txt
25
26cd $EXE_DIR
27#lors de la creation de la liste on retire les repertoires SPIN qui seront traites ulterieurement par le ccrt
28sed '/SPIN/d' ${IGCM_DEM}/Listing.txt > ${IGCM_TMP}/Listing_tmp.txt; mv ${IGCM_TMP}/Listing_tmp.txt ${IGCM_DEM}/Listing.txt
29# on retire les fichiers issus de liens : le champ de la premiere colonne est alors un l
30awk '{if ($1!="l") print $0}' ${IGCM_DEM}/Listing.txt > ${IGCM_TMP}/Listing_tmp.txt; mv ${IGCM_TMP}/Listing_tmp.txt ${IGCM_DEM}/Listing.txt
31# on retire les fichiers run.card
32sed '/run.card/d' ${IGCM_DEM}/Listing.txt > ${IGCM_TMP}/Listing_tmp.txt; mv ${IGCM_TMP}/Listing_tmp.txt ${IGCM_DEM}/Listing.txt
33# on retire les fichiers Script_Output
34sed '/Script_Output/d' ${IGCM_DEM}/Listing.txt > ${IGCM_TMP}/Listing_tmp.txt; mv ${IGCM_TMP}/Listing_tmp.txt ${IGCM_DEM}/Listing.txt
35#possibilite de retirer d'autres types de fichiers ex: .jnl*
36sed '/.jnl/d' ${IGCM_DEM}/Listing.txt > ${IGCM_TMP}/Listing_tmp.txt; mv ${IGCM_TMP}/Listing_tmp.txt ${IGCM_DEM}/Listing.txt
37
38
39# gpdebug : le script n'a pas rencontre d'erreur. On créé un fichier de suivi pour create_listing dans le rep de suivi ##########
40createListingMonitoring_OK "$REPtoList"
41
42DEM_log -0 "Fin de ${SCRIPT_NAME}"
43
Note: See TracBrowser for help on using the repository browser.