public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "L. A. Walsh" <cygwin@tlinx.org>
To: cygwin@cygwin.com
Subject: Re: bc version has issue with \r when run from cmd
Date: Sun, 23 Oct 2016 01:45:00 -0000	[thread overview]
Message-ID: <580BEDBA.5060006@tlinx.org> (raw)
In-Reply-To: <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

  reply	other threads:[~2016-10-22 23:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20  7:02 dapiot holmp
2016-10-23  1:45 ` L. A. Walsh [this message]
2016-10-23 11:16 dapiot holmp
2016-10-24  6:13 ` Andrew Schulman
2016-10-24 12:17   ` Duncan Roe
2016-10-24 11:09 dapiot holmp
2016-10-24 15:30 ` Andrew Schulman
2016-10-25 21:14   ` L. A. Walsh
2016-10-26  5:12     ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=580BEDBA.5060006@tlinx.org \
    --to=cygwin@tlinx.org \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).