printf inconsistent results for %.0f

2024-08-12 Thread Laur Aliste
Configuration Information: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -Werror=implicit-function-declaration -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall uname output: Linux p14s 6.9.12-amd64 #1 SMP PREEMPT_DYNAM

Unsuccessful assignment of a readonly variable does not return 1

2016-12-12 Thread Laur Aliste
Hi, is it accepted behavior for a failing assignment of a readonly variable to return successfully? See following code: fail() { return 1 } o() { local i j i="$(fail)" || echo "i init failed" readonly j="$(fail)" || echo "j init failed" # this echo is not executed } Expected

Re: Unsuccessful assignment of a readonly variable does not return 1

2016-12-12 Thread Laur Aliste
Forgot to add: GNU bash, version *4.4.5(1)-release* (x86_64-pc-linux-gnu), running on Debian testing. On Mon, Dec 12, 2016 at 11:11 AM, Laur Aliste wrote: > > Hi, > is it accepted behavior for a failing assignment of a readonly variable to > return successfully? > > See follow

[4.4.5] trouble declaring readonly array variables

2016-12-03 Thread Laur Aliste
args expanded in arr declar: '${i[*]}'" echo "args in an arr: '${j[*]}'" } $ o "a b c" passed args expanded in arr declar: '' args in an arr: '' Platform: Linux 8570w 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux Is this a feature or a bug? Thanks in advance, Laur Aliste