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 |
From: | =?iso-8859-1?Q?Eirik_Nordbr=F8den?= <eirik DOT nordbroden AT scandpower DOT no> |
To: | <cygwin AT sourceware DOT cygnus DOT 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 |
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 |
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 DOT nordbroden AT scandpower DOT no WWW: http://www.scandpower.no/ ___________________________________________________
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |