Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-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 sabina 2.6.17-11-generic #2 SMP Tue Mar 13 23:32:38 UTC 2007 i686 GNU/Linux Machine Type: i486-pc-linux-gnu
Bash Version: 3.1 Patch Level: 17 Release Status: release Description: Between double quotes, and with something more, Substring Expansion of length 0 substitutes by one byte, the "177 127 7F DEL" ascii character. Repeat-By: $ VAR="0123456789" The first two examples are OK. $ echo n${VAR:0:0}n | od -a 0000000 n n nl 0000003 $ echo n"${VAR:0:0}"n | od -a 0000000 n n nl 0000003 In the rest the 'del' character is inserted. $ echo n"${VAR:0:0}n" | od -a 0000000 n del n nl 0000004 $ echo "n${VAR:0:0}"n | od -a 0000000 n del n nl 0000004 $ echo "n${VAR:0:0}n" | od -a 0000000 n del n nl 0000004 $ echo "n${VAR:0:0}"n | od -a 0000000 n del n nl 0000004 It happens for other offset too. $ echo "n${VAR:2:0}n" | od -a 0000000 n del n nl 0000004 $ echo "n${VAR:5:0}n" | od -a 0000000 n del n nl 0000004 $ Fix: ¿? Thanks _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash