Changeset 2035 for TOOLS


Ignore:
Timestamp:
03/25/13 17:55:41 (11 years ago)
Author:
aclsce
Message:

Modified to speed up the script.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/showPackProgress.sh

    r1978 r2035  
    232232     if [ -e ${statusfile} ] 
    233233     then 
    234          for file in `awk '{print $0}' $set` ; do 
    235          if [[ "$listName" == *"_restart_"* ]] || [[ "$listName" == *"_debug_"* ]]  
    236          then 
    237              file_tmp=$( echo $file | cut -c 5- ) 
    238          else 
    239              file_tmp=$file 
     234          
     235         if [ -s $set ] ; then 
     236             if [[ "$listName" == *"_restart_"* ]] || [[ "$listName" == *"_debug_"* ]] 
     237             then 
     238                 purge_list=$( awk '{print $0}' $set | cut -c 5- ) 
     239             else 
     240                 purge_list=$( awk '{print $0}' $set ) 
     241             fi 
     242             grep -v -F "$purge_list" ${IGCM_DEM}/Listing_progress.txt > ${IGCM_DEM}/Listing_progress_tmp.txt 
     243             mv ${IGCM_DEM}/Listing_progress_tmp.txt ${IGCM_DEM}/Listing_progress.txt 
    240244         fi 
    241          grep -v $file_tmp ${IGCM_DEM}/Listing_progress.txt > ${IGCM_DEM}/Listing_progress_tmp.txt 
    242          mv ${IGCM_DEM}/Listing_progress_tmp.txt ${IGCM_DEM}/Listing_progress.txt 
    243          done 
    244245     fi 
    245246 
Note: See TracChangeset for help on using the changeset viewer.