What is the difference between = and == to compare strings in Linux shell programming?
=
==
Maybe the following code works:
if [ \"$
you can take a look here or here. Personally, to compare strings, I use case
case
case "$string1" in "$string2" ) echo "matched";; *) echo "not matched";; esac
I do not have to know which operator i should use