if [ -d "my" ]; then
echo "yes"
else
echo "no"
fi
if [ -f "my.txt" ]; then
echo "yes"
else
echo "no"
fi
shell判断目录文件是否存在
最新推荐文章于 2022-12-12 00:17:20 发布
if [ -d "my" ]; then
echo "yes"
else
echo "no"
fi
if [ -f "my.txt" ]; then
echo "yes"
else
echo "no"
fi