From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12298 invoked by alias); 12 Apr 2002 11:53:58 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 12281 invoked from network); 12 Apr 2002 11:53:55 -0000 Received: from unknown (HELO mx0.gmx.net) (213.165.64.100) by sources.redhat.com with SMTP; 12 Apr 2002 11:53:55 -0000 Received: (qmail 8516 invoked by uid 0); 12 Apr 2002 11:53:53 -0000 Date: Fri, 12 Apr 2002 05:03:00 -0000 From: Markus Brandt To: cygwin@cygwin.com MIME-Version: 1.0 Subject: Bug - GAWK prints wrong CR when called outside from cygwin X-Priority: 3 (Normal) X-Authenticated-Sender: #0000782713@gmx.net X-Authenticated-IP: [217.6.184.194] Message-ID: <2277.1018612433@www50.gmx.net> X-Flags: 0001 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-SW-Source: 2002-04/txt/msg00672.txt.bz2 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 . 12.04.2002 12:21 .. 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/