X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=FbylgmxPa5b41/6jdPVDApy+PEXQRZ9rKOnh4ci7CPz JdxpjSQ2Kjvc6FEwcx9ozTNQxJvmfPysJVyD2kcBwlL6577+suLMG31rR6lMrVu2 jFYcg0Tg3a8YMO719P4cGVkWZV+r2lr3g9mWb7RaoTVfTVcGyQjxBHAHFyd9QPw0 = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=xuU7tLmcDCDUiQHAno2YpjX3n58=; b=i9xQMy17Qh4wu3iw/ 62c/Z9Gi6mBOQp0ni5hNFUF+3em/RQ8zlQZrt1ufFf6AM+rdF9Qg/0etPAYCAKMX dH7eDYWnKNHe60tTpIL9MMHga5Lc5UXc5KP1S8jB4JaORs1ZmCnru7vizLgxKPK9 sr3zpjKhXC5IX/UgOqQ1SWxDWQ= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Message-ID: <580BEDBA.5060006@tlinx.org> Date: Sat, 22 Oct 2016 15:52:42 -0700 From: "L. A. Walsh" User-Agent: Thunderbird MIME-Version: 1.0 To: cygwin AT cygwin DOT 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 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