On Fri, Aug 24, 2012 at 10:34:44AM -0400, Chet Ramey wrote: > > On Fri, Aug 24, 2012 at 10:01:32AM -0400, Chet Ramey wrote: > > > On 8/24/12 8:54 AM, Michal Soltys wrote: > > > > In case of single '=' operator used in [[ <expression> ]], rhs argument > > > > was treated as a pattern. Only == and != should treat rhs argument as a > > > > pattern, so this patch fixes it. > > > > > > Incorrect; `=' and `==' are identical. > > > > Perhaps he is assuming the man page is exhaustive. The section for the > > [[ command only mentions the == and != operators: > > Maybe. The `CONDITIONAL EXPRESSIONS' section makes it clear they're > identical.
string1 == string2 string1 = string2 True if the strings are equal. = should be used with the test command for POSIX conformance. I can see how one might interpret this to mean that == and = are only identical for exact string comparisons, rather than pattern matching.