bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden:offset:length} problem with non-blank IFS


From: Lea Wiemann
Subject: address@hidden:offset:length} problem with non-blank IFS
Date: Mon, 07 Jan 2008 03:02:05 +0100

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 fly 2.6.22-3-686 #1 SMP Mon Nov 12 08:32:57 UTC 2007 i686 
GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.1
Patch Level: 17
Release Status: release

Description:

When IFS does not contain the blank character, var="(address@hidden)"
works fine, but var="(address@hidden:offset:length})" does not (it creates
a single-element array).

Repeat-By:

IFS=$'\n'
a=(A B C D)
b=("address@hidden")
echo "address@hidden", "address@hidden"  # 4, A B C D -- OK
b=("address@hidden:2}")
echo "address@hidden", "address@hidden"  # 1, C D -- bug, should be 2, C D




reply via email to

[Prev in Thread] Current Thread [Next in Thread]