What is the difference between = and == to compare strings in Linux shell programming?
=
==
Maybe the following code works:
if [ \"$
The single equal is correct
string1 == string2 string1 = string2 True if the strings are equal. ‘=’ should be used with the test command for POSIX conformance
string1 == string2
string1 = string2
True if the strings are equal. ‘=’ should be used with the test command for POSIX conformance
NAME="rafael" USER="rafael" if [ "$NAME" = "$USER" ]; then echo "Hello" fi