摘要: if条件thenCommandelseCommandfi别忘了这个结尾If语句忘了结尾fitest.sh: line 14: syntax error:unexpected end of fiif 的三种条件表达式ifcommandthenif函数then命令执行成功,等于返回0 (比如grep ,... 阅读全文
posted @ 2015-07-22 22:39 馒头斋 阅读(282) 评论(0) 推荐(0)
摘要: 1. shell判断文件,目录是否存在或者具有权限2. #!/bin/sh3.4. myPath="/var/log/httpd/"5. myFile="/var /log/httpd/access.log"6.7. # 这里的-x 参数判断$myPath是否存在并且是否具有可执行权限8. if [... 阅读全文
posted @ 2015-07-22 22:14 馒头斋 阅读(2224) 评论(0) 推荐(0)