shell編程——判斷條件

shell編程中有兩種形式進行對判斷條件進行測試: 形式一:test 形式二:[    ] 舉個小例子說明其用法及其注意事項: 例子:判斷文件 "new.txt" 是否存在,存在現實「exist', 不存在現實」not  exitst" test -e new .txt && echo "exist"  || echo "not exist"   [ -e new .txt ] && echo "
相關文章
相關標籤/搜索