Ignore:
Timestamp:
04/17/09 15:37:12 (15 years ago)
Author:
mmaipsl
Message:

Correct other awk to gawk replacements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r108 r109  
    221221        case ${config_UserChoices_PeriodLength} in 
    222222            *Y|*y) 
    223                 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )  
     223                PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[yY]' '{print $1}' )  
    224224                IGCM_debug_Print 1 "Number of years for PeriodLength : ${PeriodLengthInYears}" 
    225225                PeriodLengthInDays=0 
     
    231231                ;; 
    232232            *M|*m) 
    233                 PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )  
     233                PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[mM]' '{print $1}' )  
    234234                IGCM_debug_Print 1 "Number of months for PeriodLength : ${PeriodLengthInMonths}" 
    235235                typeset year1  
     
    247247                ;; 
    248248            *D|*d)   
    249                 PeriodLengthInDays=$( echo ${config_UserChoices_PeriodLength} | awk -F '[dD]' '{print $1}' ) ;; 
     249                PeriodLengthInDays=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[dD]' '{print $1}' ) ;; 
    250250            *)  
    251251                IGCM_debug_Exit "IGCM_config_PeriodStart " ${config_UserChoices_PeriodLength} " invalid period length : choose in *Y, *M, *D." 
     
    317317        case ${config_UserChoices_PeriodLength} in 
    318318            *Y|*y) 
    319                 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )  
     319                PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[yY]' '{print $1}' )  
    320320                IGCM_debug_Print 1 "Number of years for PeriodLength : ${PeriodLengthInYears}" 
    321321                PeriodLengthInDays=0 
     
    327327                ;; 
    328328            *M|*m) 
    329                 PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )  
     329                PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[mM]' '{print $1}' )  
    330330                IGCM_debug_Print 1 "Number of months for PeriodLength : ${PeriodLengthInMonths}" 
    331331                typeset year1  
     
    343343                ;; 
    344344            *D|*d)   
    345                 PeriodLengthInDays=$( echo ${config_UserChoices_PeriodLength} | awk -F '[dD]' '{print $1}' ) ;; 
     345                PeriodLengthInDays=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[dD]' '{print $1}' ) ;; 
    346346            *)  
    347347                IGCM_debug_Exit "IGCM_config_PeriodStart " ${config_UserChoices_PeriodLength} " invalid period length : choose in *Y, *M, *D." 
     
    495495            # ExeCpuLog variable contents 5 fields 
    496496            echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${ExeCpuLog} ${ExeDate}" |   \ 
    497              awk '{printf("# %11d | %15s | %15s | %19s | %19s | %15.5f | %15.5f | %15.5f | %s\n", \ 
     497             gawk '{printf("# %11d | %15s | %15s | %19s | %19s | %15.5f | %15.5f | %15.5f | %s\n", \ 
    498498                              $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/run.card 
    499499        fi 
     
    526526    case ${config_UserChoices_PeriodLength} in 
    527527        *Y|*y) 
    528             PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )  
     528            PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[yY]' '{print $1}' )  
    529529            IGCM_debug_Print 1 "Number of years for PeriodLength : ${PeriodLengthInYears}" 
    530530            PeriodLengthInDays=0 
     
    536536            ;; 
    537537        *M|*m) 
    538             PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )  
     538            PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[mM]' '{print $1}' )  
    539539            IGCM_debug_Print 1 "Number of months for PeriodLength : ${PeriodLengthInMonths}" 
    540540            typeset year1  
     
    552552            ;; 
    553553        *D|*d)   
    554             PeriodLengthInDays=$( echo ${config_UserChoices_PeriodLength} | awk -F '[dD]' '{print $1}' ) ;; 
     554            PeriodLengthInDays=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[dD]' '{print $1}' ) ;; 
    555555    esac 
    556556    PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${PeriodDateBegin} $( expr ${PeriodLengthInDays} - 1 ) ) 
Note: See TracChangeset for help on using the changeset viewer.