This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

CR/LF and read is shell scripts


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/
___________________________________________________

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]