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 executing it gave me this:
./mycode.sh: line 16: [!: command not found
What's the right way to do it?
See Question&Answers more detail:os