Re: What string representations of "zero" expr should consider as "zero"? (was Re: utilities and write errors)

2021-07-02 Thread tg...@mirbsd.org via austin-group-l at The Open Group
Geoff Clare via austin-group-l at The Open Group dixit: >As far as implementation detail goes, obviously if pwd uses stdio >buffering then in order to conform to the standard it must explicitly >fflush(stdout) and check there was no write error before exiting. >I see from later in the thread that

Re: sort -c/C and last-resort sorting

2021-07-02 Thread Stephane Chazelas via austin-group-l at The Open Group
2021-07-02 15:54:48 +0100, Geoff Clare via austin-group-l at The Open Group: > Joerg Schilling wrote, on 02 Jul 2021: > > > > > > > sort: -:2: disorder: a,a > > > > > > > > Try to use the POSIX sort variant to avoid the message. > > > [...] > > > > > > I suppose you mean the -C option, which > >

Re: sort -c/C and last-resort sorting

2021-07-02 Thread Joerg Schilling via austin-group-l at The Open Group
"Geoff Clare via austin-group-l at The Open Group" wrote: > > No, I was referring to /usr/xpg4/bin/sort > > That no longer exists in Solaris. If Illumos still has it they > should probably remove it (or make it a symlink to /usr/bin/sort). OK, I checked the source and the only difference

Re: sort -c/C and last-resort sorting

2021-07-02 Thread Geoff Clare via austin-group-l at The Open Group
Joerg Schilling wrote, on 02 Jul 2021: > > > > > sort: -:2: disorder: a,a > > > > > > Try to use the POSIX sort variant to avoid the message. > > [...] > > > > I suppose you mean the -C option, which > > still checks but doesn't output a diagnostics message. > > No, I was referring to

Re: sort -c/C and last-resort sorting

2021-07-02 Thread Joerg Schilling via austin-group-l at The Open Group
Stephane Chazelas wrote: > 2021-07-02 14:07:17 +0200, Joerg Schilling via austin-group-l at The Open > Group: > > "Stephane Chazelas via austin-group-l at The Open Group" > > wrote: > > > > > Is: > > > > > > printf '%s\n' a,b a,a | sort -c -t, -k1,1 > > > > > > Meant to succeed or not? > >

Re: sort -c/C and last-resort sorting

2021-07-02 Thread Geoff Clare via austin-group-l at The Open Group
Stephane Chazelas wrote, on 02 Jul 2021: > > btw, it seems to me -C should be referenced in the EXIT STATUS > section and in the -u description like for -c. Yes, also in STDOUT. -- Geoff Clare The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Re: sort -c/C and last-resort sorting

2021-07-02 Thread Stephane Chazelas via austin-group-l at The Open Group
2021-07-02 14:07:17 +0200, Joerg Schilling via austin-group-l at The Open Group: > "Stephane Chazelas via austin-group-l at The Open Group" > wrote: > > > Is: > > > > printf '%s\n' a,b a,a | sort -c -t, -k1,1 > > > > Meant to succeed or not? > > > > It fails in GNU, busybox, OpenBSD,

Re: What string representations of "zero" expr should consider as "zero"?

2021-07-02 Thread Geoff Clare via austin-group-l at The Open Group
Vincent Lefevre wrote, on 02 Jul 2021: > > On 2021-07-02 14:30:44 +0100, Geoff Clare via austin-group-l at The Open > Group wrote: > > > With busybox expr (version 1.30.1), I get: > > > > > > $ busybox expr 0 ; echo $? > > > 0 > > > 1 > > > $ busybox expr -0 ; echo $? > > > -0 > > > 0 > > > $

Re: What string representations of "zero" expr should consider as "zero"?

2021-07-02 Thread Vincent Lefevre via austin-group-l at The Open Group
On 2021-07-02 14:30:44 +0100, Geoff Clare via austin-group-l at The Open Group wrote: > > With busybox expr (version 1.30.1), I get: > > > > $ busybox expr 0 ; echo $? > > 0 > > 1 > > $ busybox expr -0 ; echo $? > > -0 > > 0 > > $ busybox expr "" \| -0 ; echo $? > > -0 > > 0 > > $ busybox expr

Re: sort -c/C and last-resort sorting

2021-07-02 Thread Geoff Clare via austin-group-l at The Open Group
Stephane Chazelas wrote, on 02 Jul 2021: > > Is: > > printf '%s\n' a,b a,a | sort -c -t, -k1,1 > > Meant to succeed or not? > > It fails in GNU, busybox, OpenBSD, FreeBSD, Solaris, though with a > confusing: > > sort: -:2: disorder: a,a > > diagnostic and succeeds in NetBSD. > > It succeeds

Re: What string representations of "zero" expr should consider as "zero"?

2021-07-02 Thread Vincent Lefevre via austin-group-l at The Open Group
On 2021-07-02 10:54:30 +, shwaresyst via austin-group-l at The Open Group wrote: > To the extent XBD 11.1, #6 applies I suppose you mean 12.1 (Utility Argument Syntax). But #6 says "Unless otherwise specified", which is the case for expr, which explicitly says when the argument is read as a

Re: What string representations of "zero" expr should consider as "zero"?

2021-07-02 Thread Geoff Clare via austin-group-l at The Open Group
Vincent Lefevre wrote, on 02 Jul 2021: > > On 2021-07-02 09:31:11 +0100, Geoff Clare via austin-group-l at The Open > Group wrote: > > I would say the standard is unclear. To me the most reasonable > > interpretation of "The expression evaluates to null or zero" is > > that it evaluates to

[Issue 8 drafts 0001476]: Missing '+' character in the second example explanation

2021-07-02 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
The following issue has a resolution that has been APPLIED. == https://austingroupbugs.net/view.php?id=1476 == Reported By:kre Assigned To:

Re: sort -c/C and last-resort sorting

2021-07-02 Thread Joerg Schilling via austin-group-l at The Open Group
"Stephane Chazelas via austin-group-l at The Open Group" wrote: > Is: > > printf '%s\n' a,b a,a | sort -c -t, -k1,1 > > Meant to succeed or not? > > It fails in GNU, busybox, OpenBSD, FreeBSD, Solaris, though with a > confusing: > > sort: -:2: disorder: a,a Try to use the POSIX sort

sort -c/C and last-resort sorting

2021-07-02 Thread Stephane Chazelas via austin-group-l at The Open Group
Is: printf '%s\n' a,b a,a | sort -c -t, -k1,1 Meant to succeed or not? It fails in GNU, busybox, OpenBSD, FreeBSD, Solaris, though with a confusing: sort: -:2: disorder: a,a diagnostic and succeeds in NetBSD. It succeeds with -s in all implementations that support that flag (all but Solaris

[Issue 8 drafts 0001485]: It may be clearer to describe pthread_cond_timedwait in terms of pthread_cond_clockwait rather than the other way round

2021-07-02 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
The following issue has a resolution that has been APPLIED. == https://austingroupbugs.net/view.php?id=1485 == Reported By:mikecrowe

[Issue 8 drafts 0001448]: Misleading text in description of poll()

2021-07-02 Thread Austin Group Bug Tracker via austin-group-l at The Open Group
The following issue has a resolution that has been APPLIED. == https://austingroupbugs.net/view.php?id=1448 == Reported By:kre Assigned To:

Re: What string representations of "zero" expr should consider as "zero"?

2021-07-02 Thread shwaresyst via austin-group-l at The Open Group
To the extent XBD 11.1, #6 applies and 2's complement notation is the internal representation required, the standard is pretty clear. The first 3 cases all evaluate to numeric 0, whether specified in paired quotes or not since the shell does quote removal, the +0 case is always a string since +

Re: What string representations of "zero" expr should consider as "zero"?

2021-07-02 Thread Vincent Lefevre via austin-group-l at The Open Group
On 2021-07-02 09:31:11 +0100, Geoff Clare via austin-group-l at The Open Group wrote: > I would say the standard is unclear. To me the most reasonable > interpretation of "The expression evaluates to null or zero" is > that it evaluates to either a null string or a zero-valued integer. >

Re: What string representations of "zero" expr should consider as "zero"?

2021-07-02 Thread Stephane Chazelas via austin-group-l at The Open Group
2021-07-02 10:08:52 +0100, Stephane Chazelas via austin-group-l at The Open Group: [...] > It's a common problem in practice [...] expr has so many design flaws, maybe the best approach would be to remove it from the standard altogether. In practice, it can't be used reliably, and it's mostly

Re: What string representations of "zero" expr should consider as "zero"?

2021-07-02 Thread Stephane Chazelas via austin-group-l at The Open Group
2021-07-02 09:31:11 +0100, Geoff Clare via austin-group-l at The Open Group: > Stephane Chazelas wrote, on 01 Jul 2021: > > > > BTW, for "expr", what is "zero" meant to be? > > > > I see some variation in behaviour for "00", " 0", "-0", "+0", > > $'\r0', which some (but not all) also treat as

Re: What string representations of "zero" expr should consider as "zero"?

2021-07-02 Thread Geoff Clare via austin-group-l at The Open Group
Stephane Chazelas wrote, on 01 Jul 2021: > > BTW, for "expr", what is "zero" meant to be? > > I see some variation in behaviour for "00", " 0", "-0", "+0", > $'\r0', which some (but not all) also treat as zero. > Also 0,000 or 0,000,000 in locales where "," is a thousand > separator with