How to find if a directory exists in bash:
bash |copy code |?
1 DIR="/etc"2 if [ -d $DIR ]; then3 echo "Folder ${DIR} exists"4 else5 echo "Folder ${DIR} does NOT exists"6 fi
How to find if a directory exists in bash:
bash |copy code |?
1 DIR="/etc"2 if [ -d $DIR ]; then3 echo "Folder ${DIR} exists"4 else5 echo "Folder ${DIR} does NOT exists"6 fi