在server0上穿件一个名为/root/script.sh的脚本,让其提供给下列的特性
1.当运行/root/script.sh all,输出为none
2.当运行/root/script.sh none,输出为all
3.当没有任何参数或者参数不是all或者none时,其错误的输出产生一下信息/root/script.sh all | none
vim /root/script.sh
#!/bin/bash
case $1 in
all)
echo none
;;
none)
echo all
;;
*)
echo "root/script.sh all | none"
;;
esac
chmod +x /root/script.sh
原文地址:http://12968185.blog.51cto.com/12958185/1960317