solaris,linux,aix,输出操作系统标识;即 自动识别操作系统,


OSNAME=`uname`
echo $OSNAME
if [ $OSNAME = "Linux" ] ; then
    JAVA_HOME=`cd "$UMS_HOME"/jdk/jdk/linux/; pwd`
fi

if [ $OSNAME = "SunOS" ] ; then
    JAVA_HOME=`cd "$UMS_HOME"/jdk/jdk/solaris/; pwd`
fi

if [ $OSNAME = "AIX" ] ; then
    JAVA_HOME=`cd "$UMS_HOME"/jdk/jdk/aix/; pwd`
fi



你可能感兴趣的:(Solaris)