Ignore:
Timestamp:
06/03/10 19:00:18 (14 years ago)
Author:
mmaipsl
Message:

Suppress default use of '-e' parameter to echo because it doesn't work on all systems.
Use explicit ANSI colors when '-e' is passed to IGCM_debug_Print function as second argument.
Use that behaviour in TimeSeries_Checker and clean_month scripts.

File:
1 edited

Legend:

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

    r271 r286  
    237237    shift 
    238238 
     239    if [ X"${1}" = X"-e" ]; then 
     240        typeset cmd_echo="echo -e" 
     241        shift 
     242    else 
     243        typeset cmd_echo="echo" 
     244    fi 
     245 
    239246    if [ ${level} -le ${Verbosity} ] ; then 
    240247        typeset i 
    241248        case "${level}" in 
    242249            1) for i in "$@" ; do 
    243                     echo -e "--Debug1-->" ${i} 
     250                    ${cmd_echo} "--Debug1-->" ${i} 
    244251              done ;;  
    245252            2) for i in "$@" ; do 
    246                     echo -e "--------Debug2-->" ${i} 
     253                    ${cmd_echo} "--------Debug2-->" ${i} 
    247254              done ;;  
    248255            3) for i in "$@" ; do 
    249                     echo -e "--------------Debug3-->" ${i} 
     256                    ${cmd_echo} "--------------Debug3-->" ${i} 
    250257              done ;;  
    251258        esac 
Note: See TracChangeset for help on using the changeset viewer.