bug-bash
[Top][All Lists]
Advanced

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

$LINENO can't be modified in bash 3.0, while this can be done in bash 2.


From: Ahmed Darwish
Subject: $LINENO can't be modified in bash 3.0, while this can be done in bash 2.05b
Date: Mon, 7 Nov 2005 21:01:24 +0200

I've noticed that the $LINENO can't be modified in bash 3.0. I made a
script (bash debugger) which modify LINENO to a specific value before
using it, it worked in bash 2.05b. but in bash 3.0, even if i've
changed it's value, it counts from "one" like nothing happened

Ex:
------------------------------------------
#! /bin/bash
LINENO=-2
echo "Line = $LINENO"
echo "Line = $LINENO"
echo "Line = $LINENO"
echo "Line = $LINENO"
-------------------------------------------

*result in bash 2.05b:
Line = -1
Line = 0
Line = 1
Line = 2

*result in bash 3.0:\
Line = 3
Line = 4
Line = 5
Line = 6

Is this a bug ?!! and how to change LINENO value in bash3.0
Thanks for help

--
Ahmed S. Darwish




reply via email to

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