Getting “command not found” error while comparing two strings in Bash

This is problem:

if [[$variable == $blanko]];

Spaces are required inside square brackets, use it like this:

[[ "$variable" == "$blanko" ]] && echo "Nichts da!" || echo "$variable"

Leave a Comment