delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
Date: | Fri, 12 Apr 2002 13:53:53 +0200 (MEST) |
From: | Markus Brandt <MaBrandt AT gmx DOT net> |
To: | cygwin AT cygwin DOT com |
MIME-Version: | 1.0 |
Subject: | Bug - GAWK prints wrong CR when called outside from cygwin |
X-Priority: | 3 (Normal) |
X-Authenticated-Sender: | #0000782713 AT gmx DOT net |
X-Authenticated-IP: | [217.6.184.194] |
Message-ID: | <2277.1018612433@www50.gmx.net> |
X-Flags: | 0001 |
Hello, when gawk is called outside the cygwin runtime, i.e. called from a command prompt under Windows, and it's input is redirected to a pipe with an output of a non-cygwin command, e.g. the Windows DIR, it does not recognize this. As a result input conversion from "\r\n" to "\n" isn't performed an additional "\r"s are printed. Example: C:\TEMP\foo>dir Datenträger in Laufwerk C: ist System Volumeseriennummer: FCD8-BBF6 Verzeichnis von C:\TEMP\foo 12.04.2002 12:21 <DIR> . 12.04.2002 12:21 <DIR> .. 12.04.2002 12:20 0 bar_1 12.04.2002 12:20 0 bar_2 2 Datei(en) 0 Bytes 2 Verzeichnis(se), 3.320.262.656 Bytes frei C:\TEMP\foo>dir /b | gawk '{print $0 $0}' bar_1 bar_2 ==> should print bar_1bar_1 and bar_2bar_2. ==> In fact bar_1\rbar_1 and bar_2\rbar_2 are printed. ==> (Can be seen with redirection and a hex editor) C:\TEMP\foo>ls -1 | gawk '{print $0 $0}' bar_1bar_1 bar_2bar_2 C:\TEMP\foo>bash -c "ls -1 | gawk '{print $0 $0}'" bar_1bar_1 bar_2bar_2 ==> These outputs are correct. Best regards Markus Brandt -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |