Google

Linux/Unix系统通用的Shell脚本中区分平台的一个方法

2007-09-28 12:54 来源: icymoon.cublog.cn 作者:icymoon 网友评论 0 条 浏览次数 32
 
#!/bin/ksh

PLATFORM=`uname`

#AIX
if [[ "$PLATFORM" = "AIX" ]]; then
        function_aix
fi

#Solaris
if [[ "$PLATFORM" = "SunOS" ]]; then
        function_sunos
fi

#Linux
if [[ "$PLATFORM" = "Linux" ]]; then
        function_linux
fi

#...
上一篇: 下一篇:

相关主题:

网友评论