Here's a try (see below);
one sentence one line while here.
I would also replace 'results' with 'result' everywhere,
but I am not a native speaker.
Jan
On Nov 10 18:46:08, [email protected] wrote:
> On Nov 10 18:15:44, [email protected] wrote:
> > expr(1) says
> >
> > expr1 {=, >, >=, <, <=, !=} expr2
> >
> > Returns the results of integer comparison if both arguments
> > are decimal integers; otherwise, returns the results of
> > string comparison using the locale-specific collation
> > sequence. The result of each comparison is 1 if the specified
> > relation is true, or 0 if the relation is false.
> >
> > Looking at expr.c, it boils down to strcoll(), which ignores the locale.
> > So the statement is technically true, but there isn't really any
> > "locale-specific collation sequence".
> >
> > Would it be simpler to leave the mention of locale completely out?
> > Or state something similar to what sort(1) or strcoll(3) and other
> > string-comparing routines say?
>
> For example,
>
> $ expr č '<' d
> 0
>
> Which locale-specific collation sequence determined that?
> Byte by byte, it's
>
> c48d U+00010d č LATIN SMALL LETTER C HACEK
> 64 U+000064 d LATIN SMALL LETTER D
>
> and I don't think there is anything more to it.
> (Although in the Czech alphabet, č comes just before d.)
>
> Jan
Index: expr.1
===================================================================
RCS file: /cvs/src/bin/expr/expr.1,v
retrieving revision 1.24
diff -u -p -r1.24 expr.1
--- expr.1 16 Aug 2017 20:10:58 -0000 1.24
+++ expr.1 15 Nov 2021 14:40:33 -0000
@@ -39,9 +39,10 @@ Returns the evaluation of
if neither expression evaluates to an empty string or zero;
otherwise, returns zero.
.It Ar expr1 Li "{=, >, >=, <, <=, !=}" Ar expr2
-Returns the results of integer comparison if both arguments are
-decimal integers; otherwise, returns the results of string comparison
-using the locale-specific collation sequence.
+Returns the results of integer comparison
+if both arguments are decimal integers;
+otherwise, returns the results of string comparison using
+.Xr strcoll 3 .
The result of each comparison is 1 if the specified relation is true,
or 0 if the relation is false.
.It Ar expr1 Li "{+, -}" Ar expr2
>