[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A note for read builtin
From: |
Krzysztof Żelechowski |
Subject: |
A note for read builtin |
Date: |
Wed, 16 Jun 2010 19:47:03 +0200 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; ) |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc -I/usr/src/packages/BUILD/bash-4.0 -
L/usr/src/packages/BUILD/bash-4.0/../readline-6.0
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -
DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-suse-linux-gnu' -
DCONF_VENDOR='suse' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -
DHAVE_CONFIG_H -I. -I. -I./include -I./lib -fmessage-length=0 -O2 -Wall -
D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-
tables -g -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g -std=gnu89 -Wuninitialized -
Wextra -Wno-unprototyped-calls -Wno-switch-enum -Wno-unused-variable -Wno-
unused-parameter -ftree-loop-linear -pipe -fprofile-use
uname output: Linux ne-1 2.6.31.12-0.2-desktop #1 SMP PREEMPT 2010-03-16
21:25:39 +0100 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-suse-linux-gnu
Bash Version: 4.0
Patch Level: 35
Release Status: release
Description:
The description of the read builtin [19] would benefit of the following note:
Warning: A pipeline of the form { echo 1 2 | read a b; } is not useful. Use {
read<<<"1 2" a b; } instead.
[19] <URL:http://www.gnu.org/software/bash/manual/html_node/Bash-
Builtins.html#Bash-Builtins>
Repeat-By:
unset a
echo 1 | read a
: "${a?FAILED}"
Fix:
read<<<"1" a
- A note for read builtin,
Krzysztof Żelechowski <=
- Re: A note for read builtin, Greg Wooledge, 2010/06/16
- Re: A note for read builtin, Marc Herbert, 2010/06/17
- Re: A note for read builtin, Roman Rakus, 2010/06/17
- Re: A note for read builtin, Marc Herbert, 2010/06/17
- Re: A note for read builtin, Jan Schampera, 2010/06/17
- Message not available
- Re: A note for read builtin, Jan Schampera, 2010/06/18
- Message not available
- Re: A note for read builtin, Jan Schampera, 2010/06/18