Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g -Wuninitialized -Wextra -Wno-switch-enum -Wno-unused-variable -Wno-unused-parameter -Wno-parentheses -ftree-loop-linear -pipe -DBNC382214=0 -DIMPORT_FUNCTIONS_DEF=0 -Wno-parentheses -Wno-format-security uname output: Linux boole 4.12.14-lp150.12.48-default #1 SMP Tue Feb 12 14:01:48 UTC 2019 (268f014) x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-suse-linux-gnu
Bash Version: 5.0 Patch Level: 3 Release Status: release Description: I've reports from users that some of their scripts do not show the correct line number if $LINENO is echoed Repeat-By: The script ----------------------------------------------------- #!/bin/bash -x echo "003: $LINENO" echo x && { (PATH=/bin; sh -c :) } echo "007: $LINENO" ----------------------------------------------------- shows: tmp/bug.sh + echo '003: 3' 003: 3 + echo x x + PATH=/bin + sh -c : + echo '007: 6' 007: 6