bash shell 判断文件夹存在

#!/usr/bin/bash

folderPath="./data"

if [ ! -d "${folderPath}" ];then
  mkdir ${folderPath}
else
    echo "文件夹已经存在"
fi
文章目录