Changeset 1881
- Timestamp:
- 09/14/12 12:38:42 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/PACK_IPSL/launch_and_measureTime.sh
r1880 r1881 193 193 outputToSearchIn=$1 194 194 listToRmvFile=$2 195 listsToProcessFile=$3 196 # On cherche les listes qui ont ete traitees correctement a la precedente etape de traitement 195 197 cat ${outputToSearchIn} | grep -e '^#executed by' | awk '{ if ($9 == 0) {print $12} }' >> ${listToRmvFile} 196 } 198 199 # Cependant, il se peut (cas du basculement de listes "output_ncrcat" vers "output_tar") que des listes soient 200 # encore a traiter alors que qu'il y a eu traitement correct. 201 # Ne pas supprimer ces listes (les retirer du fichier des listes a supprimer). 202 listToRmvFile_tmp="${listToRmvFile}_tmp" 203 cp $listToRmvFile $listToRmvFile_tmp 204 205 old_IFS=$IFS # sauvegarde du séparateur de champ 206 IFS=$'\n' # nouveau séparateur de champ, le caractère fin de ligne 207 for list in $( cat $listToRmvFile_tmp | grep "/output_ncrcat/" ) 208 do 209 list_tar=`echo $list | sed 's;output_ncrcat;output_tar;' ` 210 isInLstsToProcess=`grep $list_tar $listsToProcessFile | wc -l ` 211 if [ "x${isInLstsToProcess}" != "x0" ] 212 then 213 lineNbInRmvFile=`grep -n $list_tar $listToRmvFile | awk -F":" '{print $1}' ` 214 sed -i "${lineNbInRmvFile}d" ${listToRmvFile} 215 fi 216 done 217 218 for list in $( cat $listToRmvFile_tmp | grep "/output_tar/" ) 219 do 220 list_ncrcat=`echo $list | sed 's;output_tar;output_ncrcat;' ` 221 isInLstsToProcess=`grep $list_ncrcat $listsToProcessFile | wc -l ` 222 if [ "x${isInLstsToProcess}" != "x0" ] 223 then 224 lineNbInRmvFile=`grep -n $list_ncrcat $listToRmvFile | awk -F":" '{print $1}' ` 225 sed -i "${lineNbInRmvFile}d" ${listToRmvFile} 226 fi 227 done 228 IFS=$old_IFS # rétablissement du séparateur de champ par défaut 229 230 rm -f $listToRmvFile_tmp 231 } 232 197 233 function removeFilesInLists 198 234 { … … 405 441 realDataToDestroyFileFromPrevTry="${progressDir}/realDataToDestroyFromPrev__try__${numPrevTry}__instance__${numLastInstInstanceInPrevTry}.txt" 406 442 407 searchListsToDestroy $output_of_LastInst $listsOfFilesToRemoveFromPrevTry 443 searchListsToDestroy $output_of_LastInst $listsOfFilesToRemoveFromPrevTry ${inputCmd} 408 444 removeFilesInLists $listsOfFilesToRemoveFromPrevTry $removedFilesFromPrevTry $linksToDestroyFileFromPrevTry $realDataToDestroyFileFromPrevTry 409 445 … … 529 565 > $realDataToDestroyFile 530 566 531 searchListsToDestroy $output $listsOfFilesToRemove 567 searchListsToDestroy $output $listsOfFilesToRemove $nextInputCmd 532 568 533 569 removeFilesInLists $listsOfFilesToRemove $removedFiles $linksToDestroyFile $realDataToDestroyFile
Note: See TracChangeset
for help on using the changeset viewer.