This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: Message Nav: [Date Index] [Subject Index] [Author Index] [Thread Index] [Date Prev] [Date Next] [Thread Prev] [Thread Next] [Raw text]

Re: bc version has issue with \r when run from cmd

• From: "L. A. Walsh" <cygwin at tlinx dot org>
• To: cygwin at cygwin dot com
• Date: Sat, 22 Oct 2016 15:52:42 -0700
• Subject: Re: bc version has issue with \r when run from cmd
• Authentication-results: sourceware.org; auth=none
• References: <CAKBM6-NDxAPa3+xa48OkQyx3LGFSRKWzbV7j+F=nPJp2W28PhA@mail.gmail.com>

```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

```

Index Nav: Message Nav: [Date Index] [Subject Index] [Author Index] [Thread Index] [Date Prev] [Date Next] [Thread Prev] [Thread Next]