On Wed, Jan 18, 2023 at 03:54:02PM +0100, Emanuele Torre wrote:
> That would be wrong; [[ x < y || x = "y" ]] and [[ x > y || x = "y" ]]
> would be correct.
Am I the only person wondering when you would ever need this in a bash
script? What's the goal here -- writing your own Bubble Sort from
scratch in one of the worst imaginable languages for it? Even when
writing a comparison function for a sort routine, you only want the
swaps to happen when the strings are unequal -- never when they're equal,
since that would just be a waste of time.
Of course, given who the OP is, I know better than to ask "WAYTTD". I'd
never, EVER get an answer from them.
But maybe someone else can think of a use case.