I am trying to create a script to detect whether a directory exists, and if it does not, to create it.
How can I do that?
I did some digging and found a clue:
test -d directory
...will return true
or false
depending on whether the directory exists or not.
But how do I tie this together with mkdir
?