delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Subject: | RE: Shell script - is this expected behaviour? |
Date: | Tue, 29 Nov 2011 12:24:49 -0600 |
Message-ID: | <2BF01EB27B56CC478AD6E5A0A28931F2039D9646@A1DAL1SWPES19MB.ams.acs-inc.net> |
In-Reply-To: | <4ED4F78D.303@redhat.com> |
References: | <4ED4F78D DOT 303 AT redhat DOT com> |
From: | "Nellis, Kenneth" <Kenneth DOT Nellis AT acs-inc DOT com> |
To: | <cygwin AT cygwin DOT com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id pATIPE5Y006001 |
From: Eric Blake [mailto:eblake AT redhat DOT com] Subject: Re: Shell script - is this expected behaviour? > On 11/29/2011 02:00 AM, Gary wrote: > > If I have a shell script which reads a file which does not have an end > > of line character at the end if it's only line, it does not read > > anything. <snip> > Never feed 'read' unterminated input. Always end your text files with a > newline. When I can't control the contents of the input file, I pipe it through a filter program I wrote that adds a final newline where the last character of a stream is not a newline. --Ken Nellis -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |