[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $((expr)) allows the hexadecimal constant "0x"
From: |
Greg Wooledge |
Subject: |
Re: $((expr)) allows the hexadecimal constant "0x" |
Date: |
Mon, 11 Dec 2023 11:28:30 -0500 |
On Tue, Dec 12, 2023 at 12:10:02AM +0900, Koichi Murase wrote:
> https://lists.gnu.org/archive/html/bug-bash/2019-06/threads.html#00039
Four years later, i=$(( ${i%%[!+-]*}10#${i#[-+]} )) is still
horrible. Well, to be fair, five years since the original suggestion
<https://lists.gnu.org/archive/html/bug-bash/2018-07/msg00033.html>.
No offense to Pierre; this really is the best we've got. It's just sad
that the best answer looks like *this*.
Re: $((expr)) allows the hexadecimal constant "0x", Chet Ramey, 2023/12/11
Re: $((expr)) allows the hexadecimal constant "0x", Chet Ramey, 2023/12/11