Befehl in Bashs IF-ELSE-Bedingung nicht gefunden, wenn [! -d "$ DIR"]
Ich habe einen Code wie diesen
#!/bin/bash
DIR="test_dir/";
if [! -d "$DIR"]; then
# If it doesn't create it
mkdir $DIR
fi
Aber warum gab es mir das:
./mycode.sh: line 16: [!: command not found
Was ist der richtige Weg, um es zu tun?