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?

4 Answers
4

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *