shell编程——判断条件

shell编程中有两种形式进行对判断条件进行测试: 形式一:test 形式二:[    ] 举个小例子说明其用法及其注意事项: 例子:判断文件 "new.txt" 是否存在,存在现实“exist', 不存在现实”not  exitst" test -e new .txt && echo "exist"  || echo "not exist"   [ -e new .txt ] && echo "
相关文章
相关标签/搜索