目錄判斷:
????path="/home" ????#if?[?!?-d?${path}?];then ????if?[?-d?${path}?];then ????????echo?dir?${path}?exist! ????else ????????echo?dir?${path}?not?exist! ????fi
免費(fèi)學(xué)習(xí)視頻教程分享:linux視頻教程
文件判斷:
????file="/home/log.txt" ????if?[?-f?${file}?];then ????????echo?file?${file}?exist! ????else ????????echo?file?${file}?not?exist! ????fi
相關(guān)文章教程推薦:linux視頻教程
? 版權(quán)聲明
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載。
THE END
喜歡就支持一下吧
相關(guān)推薦