From bash manual, for conditional expressions
string1 == string2 string1 = string2True if the strings are equal.
When used with the
[[command, this performs pattern matching as described above (see Section 3.2.4.2 [Conditional Constructs], page 10).What does "pattern matching" mean here?
What is "pattern matching" opposed to here?
If not used with
[[but with other commands, what does "this" perform?
‘=’ should be used with the
testcommand for posix conformance.What does POSIX say here?
What is the sentence opposed to?
Can
==be used withtestcommand? I tried and it seems yes.Can
=be used with other commands besidestest? I tried=with[[and[, and it seems yes.
what are the differences between
==and=?In Bash 4.3, I tried
==and=withtest,[[, and[.==and=look the same to me.Can
==and=be used interchangeably in any conditional expression?
Thanks.