Re: "printf %d ''" should diagnose the empty string
From:
Oğuz
Subject:
Re: "printf %d ''" should diagnose the empty string
Date:
Tue, 26 Nov 2024 06:19:01 +0300
On Tuesday, November 26, 2024, Martin D Kealey <martin@kurahaupo.gen.nz>
wrote:
> How about a counter-proposal: when not in POSIX mode, arguments that
> correspond to numeric conversions in printf could be subject to normal
> arithmetic evaluation, so that « printf %d '6*7' » will output “42”.
>
What's the point? Just write `printf %d $((6*7))'. Shouldn't have relied on
undocumented features in the first place though
--
Oğuz