[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Missing character when using ${VAR:1} and length(VAR)==1
From: |
Chet Ramey |
Subject: |
Re: Missing character when using ${VAR:1} and length(VAR)==1 |
Date: |
Thu, 20 Sep 2007 22:47:56 -0400 |
User-agent: |
Thunderbird 2.0.0.6 (Macintosh/20070728) |
Lauffher, Wolfgang wrote:
> From: root
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux
> Compiler: gcc -I/usr/src/packages/BUILD/bash-3.1
> -L/usr/src/packages/BUILD/bash-3.1/../readline-5.1
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
> -DCONF_OSTYPE='linux' -DCONF_MACHTYPE='x86_64-suse-linux'
> -DCONF_VENDOR='suse' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
> -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O2 -fmessage-length=0 -Wall
> -D_FORTIFY_SOURCE=2 -g -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -pipe -g
> -fbranch-probabilities
> uname output: Linux erunb001 2.6.16.46-0.12-smp #1 SMP Thu May 17 14:00:09
> UTC 2007 x86_64 x86_64 x86_64 GNU/Linux
> Machine Type: x86_64-suse-linux
>
> Bash Version: 3.1
> Patch Level: 17
> Release Status: release
>
> Description:
> there is missing a charachter when using the following:
> # TT="oo"; echo "l${TT:1}l"
> lol
> # TT="o"; echo "l${TT:1}l"
> l
I can't reproduce this; I get `ll' from the second expansion.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong. No day but today.
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/