This is problem:
if [[$variable == $blanko]];
Spaces are required inside square brackets, use it like this:
[[ "$variable" == "$blanko" ]] && echo "Nichts da!" || echo "$variable"
More Related Contents:
- Test whether string is a valid integer
- How can I compare a string to multiple correct values in Bash?
- How to check if a string contains a substring in Bash
- Why should there be spaces around ‘[‘ and ‘]’ in Bash?
- How to compare strings in Bash
- How to use sed/grep to extract text between two words?
- How to trim whitespace from a Bash variable?
- How do I use variables in single quoted strings?
- How to get a variable value if variable name is stored as string?
- Extract substring in Bash
- Test for non-zero length string in Bash: [ -n “$var” ] or [ “$var” ]
- In Bash, how can I check if a string begins with some value?
- Get string after character [duplicate]
- How to test if string exists in file with Bash?
- Bash doesn’t parse quotes when converting a string to arguments
- Replacing some characters in a string with another character
- Bash: Split string into character array
- How to return a string value from a Bash function
- Case insensitive comparison of strings in shell script
- Compound ‘if’ statements with multiple expressions in Bash
- Multi-line string with extra space (preserved indentation)
- Using the && operator in an if statement
- Extract part of a string using bash/cut/split
- Compare version strings in groovy
- Shell script – remove first and last quote (“) from a variable
- How to echo “$x_$y” in Bash script?
- Convert specified column in a multi-line string into single comma-separated line
- bash : Bad Substitution
- Test for empty string with X”” [duplicate]
- Split bash string by newline characters