判斷目錄:
path="/home" #if?[?!?-d?${path}?];then if?[?-d?${path}?];then ????echo?dir?${path}?exist! else ????echo?dir?${path}?not?exist! fi
視頻教程推薦:linux視頻教程
判斷文件:
file="/home/log.txt" if?[?-f?${file}?];then ????echo?file?${file}?exist! else ????echo?file?${file}?not?exist! fi
相關文章教程推薦:linux視頻教程
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦