| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Subject: | Newbie: read works incorrectly |
| To: | cygwin AT cygwin DOT com |
| X-Mailer: | Lotus Notes Release 5.0.1a (Intl) 17 August 1999 |
| Message-ID: | <OF93F524BA.B486CD3C-ON8525699F.00516EA5@gdls.com> |
| From: | schwarza AT gdls DOT com |
| Date: | Wed, 22 Nov 2000 09:53:21 -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:53:22 AM, | |
| Itemize by SMTP Server on STLHUB/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at | |
| 11/22/2000 09:53:22 AM, | |
| Serialize by Router on STLHUB/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at | |
| 11/22/2000 09:53:23 AM, | |
| Serialize complete at 11/22/2000 09:53:23 AM |
The following statement:
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 AT gdls DOT com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |