Changeset 293


Ignore:
Timestamp:
03/21/08 14:11:17 (16 years ago)
Author:
bellier
Message:

JB: modified a ksh command, not equivalent in ksh93

Location:
modipsl/trunk/util
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • modipsl/trunk/util/clr_make

    r13 r293  
    44#- Suppression des Makefile propres a un environnement 
    55#--------------------------------------------------------------------- 
    6 d_n=$(dirname $0) 
     6d_n=$(dirname ${0}); 
    77#- 
    88l_rep=$(find ${d_n}/.. -name AA_make -print) 
  • modipsl/trunk/util/ins_job

    r222 r293  
    2828} 
    2929#- 
    30 #   dirname and  basename 
     30#     dirname     and      basename 
    3131#- 
    32 d_n=${0%/*}; b_n=${0##*/}; 
     32d_n=$(dirname ${0}); b_n=$(basename ${0}); 
    3333#- 
    3434# Retrieving and validation of the options 
  • modipsl/trunk/util/ins_m_prec

    r13 r293  
    2828" 
    2929} 
    30 #-  dirname and  basename 
    31 d_n=${0%/*}; b_n=${0##*/}; 
     30#-    dirname     and      basename 
     31d_n=$(dirname ${0}); b_n=$(basename ${0}); 
    3232#- Retrieving and validation of the options 
    3333x_v='silencious'; x_i=""; x_r=""; 
  • modipsl/trunk/util/ins_make

    r276 r293  
    2727" 
    2828} 
    29 #-  dirname and  basename 
    30 d_n=${0%/*}; b_n=${0##*/}; 
     29#-    dirname     and      basename 
     30d_n=$(dirname ${0}); b_n=$(basename ${0}); 
    3131#- Retrieving and validation of the options 
    3232x_v='silencious'; x_d='normal'; x_p="??"; x_t="??"; x_m='??'; 
  • modipsl/trunk/util/ins_post

    r49 r293  
    44#- Installation de scripts de post_traitement 
    55#----------------------------------------------- 
    6 b_n=$(basename $0) 
    7 d_n=$(dirname $0) 
     6d_n=$(dirname ${0}); b_n=$(basename ${0}); 
    87 
    98#- Saisie et validation des options 
  • modipsl/trunk/util/ins_script

    r49 r293  
    44#- Installation de scripts de lancement d experiences propres a un environnement 
    55#--------------------------------------------------------------------- 
    6 b_n=$(basename $0) 
    7 d_n=$(dirname $0) 
     6d_n=$(dirname ${0}); b_n=$(basename ${0}); 
    87 
    98#- Saisie et validation des options 
  • modipsl/trunk/util/model

    r114 r293  
    99#MAIL_COM=Mail 
    1010#- 
    11 # Dirname and Basename 
    12 #- 
    13 d_n=${0%/*}; b_n=${0##*/}; 
     11#     Dirname     and      Basename 
     12#- 
     13d_n=$(dirname ${0}); b_n=$(basename ${0}); 
    1414#- 
    1515# Retrieve and validate the options 
  • modipsl/trunk/util/w_i_h

    r87 r293  
    1 #!/bin/sh 
     1#!/bin/ksh 
    22# $Id$ 
    3 #--------------------------------------------------------------------- 
    4 #- w_i_h                                                    04/10/1999 
    5 #- Reconnaissance du systeme 
    6 #--------------------------------------------------------------------- 
    7 ( uname -s 1> /dev/null ) 2> /dev/null 
    8 if [ $? -ne 0 ]; then 
    9   exit 1; 
    10 fi; 
     3#-----------------------------------------------# 
     4#- What is host ?   -   w_i_h   -   20/03/2008 -# 
     5#-----------------------------------------------# 
     6w_z=$(uname -s -n -r -m 2>/dev/null); 
     7[[ ${?} != 0 ]] && { exit 1; } 
     8read u_s u_n u_r u_m << ! 
     9  $(print - ${w_z}) 
     10! 
     11unset w_z; 
    1112#- 
    12 USYS=`uname -s`; 
    13 #- 
    14 if   [ "$USYS" = "AIX" ]; then 
    15   WSYS=`uname -n | sed -e "s/^\(zahir\)\(.*\)/\1/"`; 
    16   if [ "$WSYS" = "zahir" ]; then 
    17     DSYS="aix"; 
    18   else 
    19     DSYS="ax_mono"; 
    20   fi; 
    21 elif [ "$USYS" = "AIXESA" ]; then 
    22   DSYS="aixesa"; 
    23 elif [ "$USYS" = "ConvexOS" ]; then 
    24   DSYS="convex"; 
    25 elif [   "$USYS" = "CP486" \ 
    26       -o "$USYS" = "dev"  ]; then 
    27   DSYS="sco"; 
    28 elif [ "$USYS" = "Darwin" ]; then 
    29   DSYS="Darwin"; 
    30 elif [ "$USYS" = "HP-UX" ]; then 
    31   WSYS=`uname -n`; 
    32   if [ "$WSYS" = "moon" ]; then 
    33     DSYS="eshpux"; 
    34   else 
    35     DSYS="hpux"; 
    36   fi; 
    37 elif [ "$USYS" = "IRIX" ]; then 
    38   WSYS=`uname -r | sed -e "s/\..*//"` 
    39   if [ "$WSYS" = "4" ]; then 
    40     DSYS="sgi4"; 
    41   else 
    42     DSYS="sgi5"; 
    43   fi; 
    44 elif [ "$USYS" = "IRIX64" ]; then 
    45   DSYS="sgi6"; 
    46 elif [ "$USYS" = "Linux" ]; then 
    47   WSYS=`uname -n | sed -e "s/^\(asterix\)\(.*\)/\1/"     \ 
    48                        -e "s/^\(obelix\)\(.*\)/\1/"      \ 
    49                        -e "s/^\(argent\)\([0-9]*\)/\1/"  \ 
    50                        -e "s/^\(platine\)\([0-9]*\)/\1/" \ 
    51                        -e "s/^\(ds\)\([0-9]*\)/\1/"` 
    52   if [   "$WSYS" = "asterix" \ 
    53       -o "$WSYS" = "obelix" ]; then 
    54     DSYS="lxiv8"; 
    55   elif [ "$WSYS" = "argent" ]; then 
    56     DSYS="argent"; 
    57   elif [ "$WSYS" = "platine" ]; then 
    58     DSYS="platine"; 
    59   elif [ "$WSYS" = "mercure" ]; then 
    60     DSYS="sx8mercure"; 
    61   elif [ "$WSYS" = "brodie" ]; then 
    62     DSYS="sx8brodie"; 
    63   elif [ "$WSYS" = "ds" ]; then 
    64     DSYS="sxdkrz"; 
    65   else 
    66     DSYS="linux"; 
    67   fi; 
    68 elif [ "$USYS" = "MIPS" ]; then 
    69   DSYS="mips"; 
    70 elif [ "$USYS" = "OSF1" ]; then 
    71   DSYS="osf1"; 
    72 elif [ "$USYS" = "SunOS" ]; then 
    73   WSYS=`uname -r | sed -e "s/\..*//"` 
    74   if [ "$WSYS" = "5" ]; then 
    75     WSYS=`uname -r | sed -e "s/.*\.//"` 
    76     if [   "$WSYS" = 1 \ 
    77         -o "$WSYS" = 2 \ 
    78         -o "$WSYS" = 3 ]; then 
    79       DSYS="solaris"; 
    80     else 
    81       DSYS="solaris"; 
    82     fi; 
    83   else 
    84     DSYS="sun"; 
    85   fi; 
    86 elif [ "$USYS" = "SUPER-UX" ]; then 
    87   DSYS="nec"; 
    88 elif [ "$USYS" = "ULTRIX" ]; then 
    89   DSYS="ultrix"; 
    90 elif [   "$USYS" = "UNICOS" \ 
    91       -o "$USYS" = "sn4803" \ 
    92       -o "$USYS" = "sn4602" ]; then 
    93   DSYS="cray"; 
    94 elif [ "$USYS" = "UNIX_System_V" ]; then 
    95   DSYS="fjvpp"; 
    96 else 
    97   WSYS=`uname -m`; 
    98   if [ "$WSYS" = "CRAY T3E" ]; then 
    99     DSYS="t3e"; 
    100   else 
    101     DSYS="Unknown"; 
    102   fi; 
    103 fi; 
     13case ${u_s} in 
     14 ( AIX ) \ 
     15  { case ${u_n} in 
     16     ( zahir* )                 DSYS="aix";; 
     17     ( * )                      DSYS="ax_mono"; 
     18    esac 
     19  };; 
     20 ( AIXESA )                     DSYS="aixesa";; 
     21 ( ConvexOS )                   DSYS="convex";; 
     22 ( CP486 | dev )                DSYS="sco";; 
     23 ( Darwin )                     DSYS="Darwin";; 
     24 ( HP-UX ) \ 
     25  { case ${u_n} in 
     26     ( moon )                   DSYS="eshpux";; 
     27     ( * )                      DSYS="hpux";; 
     28    esac 
     29  };; 
     30 ( IRIX ) \ 
     31  { case ${u_r} in 
     32     ( 4\.* )                   DSYS="sgi4";; 
     33     ( * )                      DSYS="sgi5";; 
     34    esac 
     35  };; 
     36 ( IRIX64 )                     DSYS="sgi6";; 
     37 ( Linux ) \ 
     38  { case ${u_n} in 
     39     ( asterix* | obelix* )     DSYS="lxiv8";; 
     40     ( argent[0-9]* )           DSYS="argent";; 
     41     ( platine[0-9]* )          DSYS="platine";; 
     42     ( mercure )                DSYS="sx8mercure";; 
     43     ( brodie )                 DSYS="sx8brodie";; 
     44     ( ds[0-9]* )               DSYS="sxdkrz";; 
     45     ( * )                      DSYS="linux";; 
     46    esac 
     47  };; 
     48 ( MIPS )                       DSYS="mips";; 
     49 ( OSF1 )                       DSYS="osf1";; 
     50 ( SunOS ) \ 
     51  { case ${u_r} in 
     52     ( 5\.* )                   DSYS="solaris";; 
     53     ( * )                      DSYS="sun";; 
     54    esac 
     55  };; 
     56 ( SUPER-UX )                   DSYS="nec";; 
     57 ( ULTRIX )                     DSYS="ultrix";; 
     58 ( UNICOS | sn4803 | sn4602 )   DSYS="cray";; 
     59 ( UNIX_System_V )              DSYS="fjvpp";; 
     60 (*) \ 
     61  { case ${u_m} in 
     62     ( "CRAY T3E" )             DSYS="t3e";; 
     63     ( * )                      DSYS="Unknown";; 
     64    esac 
     65  };; 
     66esac 
    10467#- 
    10568echo "$DSYS"; 
     69unset u_s u_n u_r u_m; 
    10670#- 
    10771exit 0; 
Note: See TracChangeset for help on using the changeset viewer.