如何在shell脚本中检查目录是否存在?
这个问题在这里已经有了答案:
if [ -d "/path/to/dir" ]
then
echo "Directory /path/to/dir exists."
else
echo "Error: Directory /path/to/dir does not exists."
fi
链接地址: http://www.djcxy.com/p/17477.html
上一篇: How to check if a directory exist, within a shell script?