unix - How to check if a directory exists in a shell script - Stack Overflow
What command can be used to check if a directory does or does not exist, within a shell script? ... Grundlefleck wrote: if [ -d $DIRECTORY ]; then Remember to always wrap variables in double quotes when interpolating them in a bash script....