coreutils
[Top][All Lists]
Advanced

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

test: add string operators added by POSIX 2024


From: Collin Funk
Subject: test: add string operators added by POSIX 2024
Date: Fri, 01 Nov 2024 21:02:52 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Hi,

The 'test' command has the following change in POSIX 2024 [1]:

    Austin Group Defect 375 is applied, adding the
    pathname1 -ef pathname2, pathname1 -nt pathname2,
    pathname1 -ot pathname2, s1 > s2, and s1 < s2 primaries.

The -ef, -nt, and -ot operators are already implement in Coreutils.

This patch adds '>', '<' as documented [1]:

    s1 > s2
      True if s1 collates after s2 in the current locale; otherwise, false.
    s1 < s2
      True if s1 collates before s2 in the current locale; otherwise, false.

They are sort of annoying since they have to be quoted for the shell to
not interpret them as redirections. But now that they are standardized
they should probably be implemented. :)

Collin

[1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/test.html

Attachment: 0001-test-add-string-operators-added-by-POSIX-2024.patch
Description: Text Data


reply via email to

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