[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
read with -a sets wrong variable name
From: |
SATOH Fumiyasu |
Subject: |
read with -a sets wrong variable name |
Date: |
23 Jan 2004 05:18:05 -0000 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -I. -I../bash -I../bash/include
-I../bash/lib -g -O2
uname output: Linux sugar 2.4.24-xfs-fumiya-1 #1 Mon Jan 19 21:55:52 JST 2004
i686 GNU/Linux
Machine Type: i386-pc-linux-gnu
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
The read shell builtin command with -a option does not check
if specified variable name is valid or not.
Repeat-By:
$ echo XXXX | (read " foo bar"; set |grep XXXX)
-bash: read: ` foo bar': not a valid identifier
$ echo XXXX | (read -a " foo bar"; set |grep XXXX)
foo bar=([0]="XXXX")
- read with -a sets wrong variable name,
SATOH Fumiyasu <=