Answers for "shell if directory doesn't exist"

2

linux shell check if directory does not exists

if [ ! -d directory ]; then
  mkdir directory
fi
Posted by: Guest on January-25-2021
1

check if a directory doesn't exist

PATH="./foo"
if [[ ! -d "$PATH" ]] ; then echo "$PATH not a dir" ; fi
Posted by: Guest on April-16-2021

Code answers related to "shell if directory doesn't exist"

Browse Popular Code Answers by Language