bug-bash
[Top][All Lists]
Advanced

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

Re: printf fails in version 5.2.026-3


From: Greg Wooledge
Subject: Re: printf fails in version 5.2.026-3
Date: Wed, 3 Jul 2024 18:16:48 -0400

On Wed, Jul 03, 2024 at 22:24:43 +0200, szigetva@delg0.elte.hu wrote:
> Description:
>       printf works in version 5.2.026-2, fails in version 5.2.026-3

What exactly are these version numbers?  Are they packages from some
Linux distrbution?

> Repeat-By:
>       contents of tmp.sh begins --------
>       #!/usr/bin/env bash
>       a=1
>       printf "%.2f\n" "$a"
>       contents of tmp.sh ends ----------
> 
>       5.2.026-2> ./tmp.sh
>       1.00
> 
>       5.2.026-3> ./tmp.hs
>       nan
> 
> Fix:
>       I don't understand what is happening, my current fix is downgrading to 
> 5.2.026-2.

You didn't show us the contents of the script that produces "nan" as
output.  You only showed the script that produces "1.00".

I can't reproduce this result using a self-compiled bash 5.2.26 on my
system:

hobbit:~$ bash-5.2.26 -c 'printf "%.2f\n" 1'
1.00
hobbit:~$ bash-5.2.26 -c 'echo "$BASH_VERSION"'
5.2.26(6)-release

If "5.2.026-3" is some Linux vendor's package version, then it sounds like
they introduced a patch which causes the change in behavior.  You should
contact them, via whatever bug reporting system they offer.



reply via email to

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