[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
assignment from $1 drops nonprintable chars
From: |
gmott |
Subject: |
assignment from $1 drops nonprintable chars |
Date: |
Thu, 21 Mar 2002 10:55:02 -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 ruby 2.4.7-10 #1 Thu Sep 6 16:46:36 EDT 2001 i686 unknown
Machine Type: i386-redhat-linux-gnu
Bash Version: 2.05
Patch Level: 8
Release Status: release
distribution: redhat 7.2
Description:
assignment from $a keeps the \001 character.
assignment from $1 drops the \001 character.
Repeat-By:
the following commands demonstrate the bug:
-------------------> a=$'a\001b'
-------------------> set $a
-------------------> b=$a
-------------------> c=$1
-------------------> d="$1"
-------------------> echo "length(a)="${#a}, a=$a
length(a)=3, a=ab
-------------------> echo "length(1)="${#1}, 1=$1
length(1)=3, 1=ab
-------------------> echo "length(b)="${#b}, b=$b
length(b)=3, b=ab
-------------------> echo "length(c)="${#c}, c=$c
length(c)=2, c=ab
-------------------> echo "length(d)="${#d}, d=$d
length(d)=2, d=ab
- assignment from $1 drops nonprintable chars,
gmott <=