bug-bash
[Top][All Lists]
Advanced

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

Re: "printf %d ''" should diagnose the empty string


From: Phi Debian
Subject: Re: "printf %d ''" should diagnose the empty string
Date: Mon, 10 Feb 2025 19:14:05 +0100

On Mon, Feb 10, 2025 at 7:06 PM Andreas Schwab <schwab@suse.de> wrote:

> On Feb 10 2025, Greg Wooledge wrote:
>
> > No, I've shown that it *is* working in older versions of bash, and I'm
> > asking *why*.
>
> Does it?  If it did, it should have printed -23, not -19.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
>
>   Yes modern bash git it right not the dyno one :-)

$ echo $BASH_VERSION
5.2.21(1)-release
$ i=-0023  ; echo "$((i)) $((${i/?([-+])/&10#}))"
-19 -23


reply via email to

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