bug-bash
[Top][All Lists]
Advanced

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

bash - confusing the user - a headsup/FYI/whatever


From: Hannu E K Nevalainen
Subject: bash - confusing the user - a headsup/FYI/whatever
Date: Sun, 1 Jan 2006 14:13:43 +0100

Bash 3.1 - problem remains.

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: cygwin
Compiler: gcc
Compilation
CFLAGS:  -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' 
-DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/
locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS   -I.  -I/t
mp/bash-3.1 -I/tmp/bash-3.1/include -I/tmp/bash-3.1/lib   -O2
uname output: CYGWIN_NT-5.0 amd 1.5.19s(0.149/4/2) 20051229 16:10:48 i686
unknown unknown Cygwin
Machine Type: i686-pc-cygwin

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

Description:
Repeat-By:
Fix:
  Read below.




Hannu E K Nevalainen wrote:
> New year greetings from Sweden!
>
> Below you find an issue that I have no intention/wish to discuss
> further, I just wish to bring it forth to make it get a "known
> issue" status. Reply-to set to bug-bash
>
> Expected result:
> $ echo "a b c d e f g" | \
> ( while read first second ;do echo "got $first" ;done )
> got a
>
> The above works when IFS is set as in
> $ echo -n "$IFS" | od -t x1z
> 0000000 20 09 0a                                         > ..< 0000003
>
>
> Problem:
> If I understand the "$ help read" text correctly the following
> variation should work, but it doesn't and additionally displays a
> "totally off" error message.
>
> $ echo "a b c d e f g" | \
> ( IFS=" " while read first remainder ;do echo "got $first" ;done )
> bash: syntax error near unexpected token `do'
>
>
> $ bash --version
> GNU bash, version 3.00.16(1)-release (i686-pc-linux-gnu)
> Copyright (C) 2004 Free Software Foundation, Inc.
>
> Tested on a two month old Gentoo and
>  on a fresh cygwin (www.cygwin.com) with the same bash version.
>
> /H



/H
--





reply via email to

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