echo -n "input your file path:"
read filePath
echo $filePath
if [[ -z $filePath ]]; then
echo "No input file name"
elif [[ -f $filePath ]]; then
echo "file:\"$filePath\" exists"
else
echo "file:\"$filePath\" doesn't exist"
fi
检测文件是否存在
最新推荐文章于 2023-11-26 13:37:29 发布