bash if folder not exists code example
Example 1: linux shell check if directory does not exists
if [ ! -d directory ]; then
mkdir directory
fi
Example 2: IF NOT DIR BASH
if [ ! -d "$DIRECTORY" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
fi