I have a code like this
#!/bin/bash DIR=\"test_dir/\"; if [! -d \"$DIR\"]; then # If it doesn\'t create it mkdir $DIR fi
But why
You could also attempt to simply by saying:
test -d "${dir}" || mkdir "${dir}"
This would create the directory if it doesn't exist.