The difference between single equal sign and double equal sign EQ in shell script

The single and double equal signs are arithmetic operators. “-eq” is a relational operator
Single and double equals
Equivalence in the conditional expression “[]” can be used to compare strings to strings or to compare integers to integers.
In the arithmetic expression “(())”, the single equal sign is the assignment arithmetic operator, and the double equal sign is the equality arithmetic operator.
“-eq”
The equality operator ‘-eq’ cannot be used in the arithmetic expression ‘(())’. It can only be used for equality comparisons of integer Integers.

Read More: