标签:rhce ems http 技术 截图 red src lse The
用引号将参数引用起来,这样如果参数为空值,不会报错。#!/bin/sh
if [ "$1" = "redhat" ]
then
echo "fedora"
else if [ "$1" = "fedora" ]
then
echo "redhat"
else
echo "/root/foo.sh redhat|fedora"
fi
fi
参考论坛截图
标签:rhce ems http 技术 截图 red src lse The
原文地址:https://blog.51cto.com/sampsondotqiu/2501992