[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
$'\x41\x00\x41' truncates after the first "A"
From: |
dagbrown |
Subject: |
$'\x41\x00\x41' truncates after the first "A" |
Date: |
Wed, 29 Dec 2004 07:50:44 -0800 (PST) |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2
uname output: Linux phb.lart.ca 2.6.9-rc3-beta #2 Thu Oct 14 13:22:56 PDT 2004
i586 unknown unknown GNU/Linux
Machine Type: i686-pc-linux-gnu
Bash Version: 3.0
Patch Level: 0
Release Status: release
Description:
$'(string1)\x00(string2)' truncates the string at \x00.
Repeat-By:
When I do this:
bash-3.00$ echo $'\x41\x00\x41'
I get a single "A". When I run it through od -t x1, I get this:
bash-3.00$ echo -n $'\x41\x00\x41' | od -t x1
0000000 41
0000001
bash-3.00$
- $'\x41\x00\x41' truncates after the first "A",
dagbrown <=