On Sunday 04 December 2011 06:32:47 Marek Vasut wrote: > > Should it be an equality operator instead of an assigning one? i.e: > > > > [ "$ONLY_LIST" == "y" ] && return > > 2) It's the same thing ... = and == in shell scripting.
while this is true for the particular piece of code quoted, in general, this statement is false. "==" is a bashism (it is not part of POSIX), and it allows you to do comparisons that the "=" operator does not (such as pattern matching). this code uses "=" everywhere with single brackets. any new code should stick to that form. if you want to use "==", it should be with double brackets, and probably have a good reason for it. -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot