bug-bash
[Top][All Lists]
Advanced

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

[50 character or so descriptive subject here (for reference)]


From: John Harris
Subject: [50 character or so descriptive subject here (for reference)]
Date: Fri, 29 Dec 2000 16:46:01 -0500

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-redhat-linux-gnu' 
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H  -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64  -I.  -I. -I./include -I./lib -I/usr/include -O2 
-march=i386 -mcpu=i686
uname output: Linux devlinux7 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000 
i686 unknown
Machine Type: i386-redhat-linux-gnu

Bash Version: 2.04
Patch Level: 11
Release Status: release

Description:
        The behavior of bash differs from Bourne and Korn shells when
        handling syntax such as "variable=value . script".  I'm not
        sure how to describe it in detail - but the behavioral change
        from Bourne/Korn shell to Bash is exhibited in the test scripts
        attached to this bug report.

        The impact to us is that bourne shell scripts using the above
        syntax on man Unix platforms fail on Redhat Linux which uses
        bash as it's default command interpreter (symlink to /bin/sh).

Repeat-By:
        Run the following script "bashtest" using a Bourne or Korn shell.
        Then run it again using bash v2.x and observe the different
        behavior.

        ------- cut -------
        :
        # bashtest
        #
        # Correct output (from Bourne or Korn shell):
        #bashtest: one before: 1
        #bashtest: two before: 
        #bashtest2: one before: one
        #bashtest2: two before: 1
        #bashtest3:  one before: two
        #bashtest3:  two before: two
        #bashtest4a: one: 
        #bashtest4a: two: 
        #bashtest4b: one: 
        #bashtest4b: two: 
        #bashtest3:  one after:  3
        #bashtest3:  two after:  3
        #bashtest2: one after:  3
        #bashtest2: two after:  3
        #bashtest: one after:  3
        #bashtest: two after:  3

        one=1
        echo "bashtest: one before: $one"
        echo "bashtest: two before: $two"
        one=one two=1 . bashtest2
        echo "bashtest: one after:  $one"
        echo "bashtest: two after:  $two"

        ------- cut ------- 
        :
        # bashtest2
        echo "bashtest2: one before: $one"
        echo "bashtest2: two before: $two"
        one=two two=two . bashtest3
        echo "bashtest2: one after:  $one"
        echo "bashtest2: two after:  $two"

        ------- cut ------- 
        :
        # bashtest3
        echo "bashtest3:  one before: $one"
        echo "bashtest3:  two before: $two"
        bashtest4a
        one=3
        two=3
        bashtest4b
        echo "bashtest3:  one after:  $one"
        echo "bashtest3:  two after:  $two"

        ------- cut ------- 
        :
        # bashtest4a
        echo "bashtest4a: one: $one"
        echo "bashtest4a: two: $two"

        ------- cut ------- 
        :
        # bashtest4b
        echo "bashtest4b: one: $one"
        echo "bashtest4b: two: $two"




reply via email to

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