help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: >= and <= for string comparison


From: Tapani Tarvainen
Subject: Re: >= and <= for string comparison
Date: Wed, 18 Jan 2023 10:57:35 +0200

On Wed, Jan 18, 2023 at 05:36:46PM +0900, Koichi Murase 
(myoga.murase@gmail.com) wrote:

> If we decide to support `<=' and `>=' for strings, to me, the cleanest
> solution seems to be reorganizing the lexical rule inside [[ ... ]] to
> accept <= and >= as single tokens though it would introduce
> incompatibilities.

IMHO that's the only alternative that makes sense. Either do it
that way or don't do it at all.

The obvious ! workaround is better than a new -leq would be.

> I'm currently not sure if it's worth it.

Neither am I.

I've no idea how hard it'd be to implement.

I don't, however, see the incompatibilities as a big problem, although
it would probably be necessary to have some means of disabling the
feature (a switch, POSIXLY_CORRECT &c).

-- 
Tapani Tarvainen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]