Version 2 of eq

Updated 2006-08-19 14:03:58

Infix operator for string comparison inside expr. Returns true if its arguments are string-equal.

Its opposite part is ne which returns true if its arguments are not string-equal.

Differs from == in such that its arguments cannot be treated as numerical values, so 1 == 1.0 returns true, but 1 eq 1.0 reaturns false.

Example:

 % expr {"a" eq "b"}
 0
 % expr {"a" ne "b"}
 1
 %