AM Chet Ramey wrote:
> On 10/7/21 12:58 AM, Tom Coleman wrote:
> > I did some experimenting and am confident on the fix. I don't know how to
> > supply a patch suggestion officially, but have pasted it below. Four
> lines
> > in parse.y need deleting. Arith
I did some experimenting and am confident on the fix. I don't know how to
supply a patch suggestion officially, but have pasted it below. Four lines
in parse.y need deleting. Arithmetic for loops should NOT be decrementing
the 'word_top' variable, they do not make use of it. This also has flow on
t
done
}
bad_lineno() {
for k in 1; do
for ((l=3; l<=3; l++)); do
:
done
done
}
set -x
echo "for i in 1 line number should be 9 and is"
good_lineno
echo "for k in 1 line number should be 16 but is not"
bad_lineno
On Thu, Oct 7, 2021 at 7:43 AM L A Walsh wrote
Example output with first 'j' loop uncommented:
$ bash run.sh
+L20 + setup
+L9 + export -f DO_BACKUP
+L21 + run
+L12 + for i in 1
+L13 + for j in 1
+L15 + true
Example output with the second 'j' loop uncommented:
$ bash run.sh
+L20 + setup
+L9 + export -f DO_BACKUP
+L21 + run
+L5 + for i in 1
+L14 + (( j=1 ))
+L14 + (( j<=1 ))
+L15 + true
+L14 + (( j++ ))
+L14 + (( j<=1 ))
Regards,
Tom Coleman