how to check if directory in bash code example
Example: if dir bash
if [ -d "$DIRECTORY" ]; then
# Control will enter here if $DIRECTORY exists.
fi
if [ -d "$DIRECTORY" ]; then
# Control will enter here if $DIRECTORY exists.
fi