利用 bash 檢查檔案是否存
在 Linux 中,可以透過 bash script 檢查檔案是否存在,範例如下:
資料來源:Determine if file exists in a Bourne/bash shell script - Tech-Recipes.com
if [ -f testfile ]
then
echo testfile exists!
fi
資料來源:Determine if file exists in a Bourne/bash shell script - Tech-Recipes.com
留言
張貼留言
,,