Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Subject: Newbie: read works incorrectly
To: cygwin@cygwin.com
X-Mailer: Lotus Notes Release 5.0.1a (Intl) 17 August 1999
Message-ID: <OF1E150577.13186948-ON8525699F.0051DD9A@gdls.com>
From: schwarza@gdls.com
Date: Wed, 22 Nov 2000 09:56:47 -0500
MIME-Version: 1.0
X-MIMETrack: Serialize by Router on STL01/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at
 11/22/2000 09:56:47 AM,
	Itemize by SMTP Server on STLHUB/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at
 11/22/2000 09:56:48 AM,
	Serialize by Router on STLHUB/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at
 11/22/2000 09:56:49 AM,
	Serialize complete at 11/22/2000 09:56:49 AM
Content-type: text/plain; charset=us-ascii



Sorry:

      Win95
      Pentium Pro
      128Mb Memory
      11 Nov vrs. of Cygwin (DLL 1.1.5 upgrade)
      GNU bash, version 2.04.0(1)-release (i686-pc-cygwin)

The following statement executed in a login shell:

      echo one two | while read line ; do
         printf '%s\r\n' $line
      done

generates

      one
      two

I would have expected

      one two

from (e.g.)

     Linux in a Nutshell
     Second Edition, Feb. 1999
     O'Reilly
     pg 191

and from previous experience.

Am I looking at the problem correctly? I assume that

"If only one variable is specified, the entire line
will be assigned to that variable." from the previous
reference.

art
schwarza@gdls.com




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

