[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: >= and <= for string comparison
From: |
Greg Wooledge |
Subject: |
Re: >= and <= for string comparison |
Date: |
Wed, 18 Jan 2023 10:00:39 -0500 |
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.
- Re: >= and <= for string comparison, (continued)
- Re: >= and <= for string comparison, alex xmb ratchev, 2023/01/18
- Re: >= and <= for string comparison, Ruiyang Peng, 2023/01/18
- Re: >= and <= for string comparison, Koichi Murase, 2023/01/18
- Re: >= and <= for string comparison, Ruiyang Peng, 2023/01/18
- Re: >= and <= for string comparison, Ruiyang Peng, 2023/01/18
- Re: >= and <= for string comparison, Tapani Tarvainen, 2023/01/18
- Re: >= and <= for string comparison, Ruiyang Peng, 2023/01/18
- Re: >= and <= for string comparison, Lawrence Velázquez, 2023/01/18
- Re: >= and <= for string comparison, Peng Yu, 2023/01/18
- Re: >= and <= for string comparison, Emanuele Torre, 2023/01/18
- Re: >= and <= for string comparison,
Greg Wooledge <=
- Re: >= and <= for string comparison, alex xmb ratchev, 2023/01/18
- Re: >= and <= for string comparison, Peng Yu, 2023/01/18
- Re: >= and <= for string comparison, Eduardo Bustamante, 2023/01/18
- Re: >= and <= for string comparison, Peng Yu, 2023/01/19
- Re: >= and <= for string comparison, Lawrence Velázquez, 2023/01/18
- Re: >= and <= for string comparison, Peng Yu, 2023/01/19
- Re: >= and <= for string comparison, Chet Ramey, 2023/01/19
- Re: >= and <= for string comparison, Peng Yu, 2023/01/20
- Re: >= and <= for string comparison, Seth David Schoen, 2023/01/19
- Re: >= and <= for string comparison, Peng Yu, 2023/01/17