How Do We Check If a Directory is Already Exists in Bash Shell Script?
We have two simple shell scripts here, to check the directory is already exist in your current location,
if [ -d "$DIRECTORY" ]; then
echo "The Directory $DIRECTORY is exist"
or put ! symbol before the -d
if [ ! -d "$DIRECTORY" ]; then
echo "The Directory $DIRECTORY does not exist"