[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Can no longer assign to LINENO in bash3
From: |
bronson |
Subject: |
Can no longer assign to LINENO in bash3 |
Date: |
Fri, 31 Dec 2004 23:11:34 -0800 (PST) |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -g -O2
uname output: Linux lea 2.6.9-1-k7 #1 Wed Dec 15 19:12:42 GMT 2004 i686
GNU/Linux
Machine Type: i386-pc-linux-gnu
Bash Version: 3.0
Patch Level: 16
Release Status: release
Description:
I execute the following script from the prompt, $ . tt.sh
echo $LINENO
LINENO=11
echo $LINENO
When I run it on bash 2.05b I get exactly what I would expect:
1
12
But when I trun it on bash 3.0, I get:
1
3
There are a number of bash scripts that rely on the ability to set
the line number so that proper error messages can be generated.
Without it, line numbers in error messages end up incorrect.
Is there a shopt or some other way of working around this?
Thanks,
- Scott
- Can no longer assign to LINENO in bash3,
bronson <=