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 lnxdavid 2.6.17-2-686 #1 SMP Wed Sep 13 16:34:10 UTC 2006 i686 GNU/Linux Machine Type: i486-pc-linux-gnu
Bash Version: 3.1 Patch Level: 17 Release Status: release Description: Substring operations that are meant to return an empty string "" sometimes return character "\177" instead. Repeat-By: A="" B="${A:0}" touch "/tmp/test/TEST${A:0}" -> touch: cannot touch `/tmp/test/TEST\177': No such file or directory touch "/tmp/test/TEST$B" -> touch: cannot touch `/tmp/test/TEST': No such file or directory The example above is contrived, here is another (more realistic) example: A="abc" touch "/tmp/test/TEST${A:3}" -> touch: cannot touch `/tmp/test/TEST\177': No such file or directory Fix: Bash script work-around: Use an intermediate variable until the bug is fixed. _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash