[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cygwin
Subject:    Re: bc version has issue with \r when run from cmd
From:       "L. A. Walsh" <cygwin () tlinx ! org>
Date:       2016-10-22 22:52:42
Message-ID: 580BEDBA.5060006 () tlinx ! org
[Download RAW message or body]

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 "<CR>" (Carriage Return or "\r") with *nix programs that
only expect a <LF> (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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic