What is the difference between =
, ==
and -eq
in shell scripting?
Is there any difference between the following?
[ $a = $b ]
[ $a == $b ]
[ $a -eq $b ]
Is it simply that =
and ==
are only used when the variables contain numbers?
What is the difference between =
, ==
and -eq
in shell scripting?
Is there any difference between the following?
[ $a = $b ]
[ $a == $b ]
[ $a -eq $b ]
Is it simply that =
and ==
are only used when the variables contain numbers?