bug in LINENO in busybox 1.29.3

Tito farmatito at tiscali.it
Wed Nov 28 13:25:00 UTC 2018


On 28/11/18 14:12, daggs wrote:
> Greetings,
> 
> I've encountered a strange bug in busybox 1.29.3 when using the LINENO var, the reproduction is simple, see the below bash file:
> #!/bin/bash
> 
> TEST="aaaa"
> # comment
> echo "${LINENO} TEST=${TEST}"
> 
> this should print "4 TEST=aaaa" instead of "5 TEST=aaaa"
> 
> Dagg.
>

Hi,
with bash version 4.4.12(1)-release (x86_64-pc-linux-gnu)
it prints:

  ./test.sh
5 TEST=aaaa

so it seems not to be a bug. Why do you think it is wrong?

1 #!/bin/bash
2
3 TEST="aaaa"
4 # comment
5 echo "${LINENO} TEST=${TEST}"


Ciao,
Tito


More information about the busybox mailing list