Last change
on this file since 3093 was
293,
checked in by bellier, 17 years ago
|
JB: modified a ksh command, not equivalent in ksh93
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
1.9 KB
|
Line | |
---|
1 | #!/bin/ksh |
---|
2 | # $Id$ |
---|
3 | #-----------------------------------------------# |
---|
4 | #- What is host ? - w_i_h - 20/03/2008 -# |
---|
5 | #-----------------------------------------------# |
---|
6 | w_z=$(uname -s -n -r -m 2>/dev/null); |
---|
7 | [[ ${?} != 0 ]] && { exit 1; } |
---|
8 | read u_s u_n u_r u_m << ! |
---|
9 | $(print - ${w_z}) |
---|
10 | ! |
---|
11 | unset w_z; |
---|
12 | #- |
---|
13 | case ${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 | };; |
---|
66 | esac |
---|
67 | #- |
---|
68 | echo "$DSYS"; |
---|
69 | unset u_s u_n u_r u_m; |
---|
70 | #- |
---|
71 | exit 0; |
---|
Note: See
TracBrowser
for help on using the repository browser.