My whole Script is currently this:
#!/bin/sh
clear;
blanko="";
# Dummy-Variablen
variable=Testvariable;
if [[$variable == $blanko]];
then
echo "Nichts da!"
else
echo $variable
fi
and if i enter
TestSelect.sh
i get
/usr/bin/TestSelect.sh: line 6: [[Testvariable: command not found
Testvariable
how can i fix this?
This is problem:
if [[$variable == $blanko]];
Spaces are required inside square brackets, use it like this:
[[ "$variable" == "$blanko" ]] && echo "Nichts da!" || echo "$variable"