This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
CR/LF and read is shell scripts
- To: <cygwin at sourceware dot cygnus dot com>
- Subject: CR/LF and read is shell scripts
- From: Eirik Nordbrøden <eirik dot nordbroden at scandpower dot no>
- Date: Fri, 18 Aug 2000 10:07:18 +0200
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/
___________________________________________________