From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111927 invoked by alias); 22 Oct 2016 23:04:07 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 111918 invoked by uid 89); 22 Oct 2016 23:04:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=pipes, carriage, Carriage, Feed X-HELO: Ishtar.sc.tlinx.org Received: from ishtar.tlinx.org (HELO Ishtar.sc.tlinx.org) (173.164.175.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 22 Oct 2016 23:04:05 +0000 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id u9MN3xJZ060341 for ; Sat, 22 Oct 2016 16:04:02 -0700 Message-ID: <580BEDBA.5060006@tlinx.org> Date: Sun, 23 Oct 2016 01:45:00 -0000 From: "L. A. Walsh" User-Agent: Thunderbird MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: bc version has issue with \r when run from cmd References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00252.txt.bz2 dapiot holmp wrote: > the version of bc that comes with cygwin, is bc 1.06.95 it works > fine from within the cygwin environment, but from cmd it doesn't > process \r > > C:\cygwin\bin>echo 5+4|.\bc > (standard_in) 1: illegal character: ^M --- It's not about "bc" not working with cmd. The problem is that cmd is sending a "^M" which doesn't happen when you are "within the cygwin environment". I.e. it's not a bug or problem in "bc", but the fact that you are using "cmd" which sends those extra characters all the time (to all programs receiving pipes). If you don't want the "^M", don't mix Windows programs which send the "" (Carriage Return or "\r") with *nix programs that only expect a (Line Feed; ^J or "\n"). Does that make sense? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple