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
From: =?iso-8859-1?Q?Eirik_Nordbr=F8den?= <eirik.nordbroden@scandpower.no>
To: <cygwin@sourceware.cygnus.com>
Subject: CR/LF and read is shell scripts
Date: Fri, 18 Aug 2000 10:07:18 +0200
Message-ID: <000201c008eb$53d30910$8e8845c1@halden.scandpower.no>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id EAA26701

Hello

I have just installed cygwin on my NT workstation and have a problem with a shell script. The script generates a temporary file by the use of the echo statement and later on the content is evaluated with a cat and consecutive read statements. The problem is that the generated file contains CRLF at the end of each line, but the read statement only recognises the LF and therefore adds CR to the last variable read. I do not want to change the script so I wonder if this is an installation problem or if there are some other way to get around it. At installation I choose the option to treat all text files as MS Dos files.

___________________________________________________

Eirik Nordbrøden    Tlf.        (+47) 69 21 27 18
Scandpower A/S      Fax.        (+47) 69 18 44 35
Os Alle 9           Tlf. priv.  (+47) 69 18 78 99
N-1777 Halden       Tlf. mobile (+47) 90 17 47 89
Norway

Email: mailto:eirik.nordbroden@scandpower.no
WWW:   http://www.scandpower.no/
___________________________________________________
