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' -DSHELL -DHAVE_CONFIG_H  -I.  -I../bash -I../bash/include
-I../bash/lib  -g -O2
uname output: Linux client1 2.6.8-2-386 #1 Thu May 19 17:40:50 JST 2005 i686
GNU/Linux
Machine Type: i386-pc-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
    The [ command error reporting can incorrectly state which file an error
occured in.

Repeat-By:
    Create A.sh:
        #!/bin/sh
        echo "about to source B.sh"
        source B.sh
        echo "finished sourcing B.sh"

    Create B.sh:
        #!/bin/sh
        echo "first line of B.sh. next line has an error.."
        [ 0 [
        echo "after error-line"

    Run A.sh:
        [EMAIL PROTECTED]:~> ./A.sh
        line 3 of A.sh. about to source B.sh
        line 2 of B.sh. next line has an error..
        ./A.sh: line 3: [: missing `]'
        after error-line
        finished sourcing B.sh
        [EMAIL PROTECTED]:~>

    See that the error message says that the error occured on line 3 of A.sh,
when in fact the error occured on line 3 of B.sh

-Nick Hoffman
[EMAIL PROTECTED]


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to