‘-eq’ and ‘=’. They are slightly different: ‘-eq’ is a integer comparison but ‘=’ is a string comparison.

Examples:

[[ 0 -eq 0000 ]]; echo $? # shows 0 (true)

[[ 0 = 0000 ]]; echo $? # shows 1 (false)

don’t forget to surround each $var1 with double quotes to prevent null chars.

if [ $var1 -eq $var2 -a $var3 = $var4 ]

– eq for numeric compare
= for string compare
-a is “and” operator