rhce 脚本
用引号将参数引用起来,这样如果参数为空值,不会报错。
#!/bin/sh if [ "$1" = "redhat" ] then echo "fedora" else if [ "$1" = "fedora" ] then echo "redhat" else echo "/root/foo.sh redhat|fedora" fi fi
参考论坛截图
相关推荐
linuxvfast 2019-12-26
hygbuaa 2019-12-16
zhangxiaocc 2019-12-10
chuangjinweilai 2019-12-03
jiangtie 2019-11-15
linuxvfast 2019-10-30
一万年太久 2019-10-29
xiyoukeke 2010-04-27
swency 2019-04-29
一万年太久 2019-03-21
zfyaixue 2019-01-04
LiveorDie 2018-12-26
swency 2018-07-06
bailove 2015-12-08
featherli0 2015-12-06
sinceNow 2015-11-17
supetan 2015-11-09