2011年12月1日 星期四

檢查檔案是否存在

if [ -f "檔案路徑" ]; then
    echo "檔案存在!!"
else
    echo "檔案不存在!!"
fi


or


if [ ! -f "檔案路徑" ]; then

沒有留言:

張貼留言