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
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
> >
"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
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
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?
> >
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
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,
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
> > > $
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
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
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
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
The following issue has a resolution that has been APPLIED.
==
https://austingroupbugs.net/view.php?id=1476
==
Reported By:kre
Assigned To:
"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
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
The following issue has a resolution that has been APPLIED.
==
https://austingroupbugs.net/view.php?id=1485
==
Reported By:mikecrowe
The following issue has a resolution that has been APPLIED.
==
https://austingroupbugs.net/view.php?id=1448
==
Reported By:kre
Assigned To:
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 +
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.
>
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
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
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
22 matches
Mail list logo