HuYuee/blog

shell脚本--判断系统

HuYuee opened this issue · 0 comments

以下小脚本内容用于系统判断的示例

sysOS=`uname -s`
if [ $sysOS == "Darwin" ];then
	echo "I'm MacOS"
elif [ $sysOS == "Linux" ];then
	echo "I'm Linux"
else
	echo "Other OS: $sysOS"
fi