public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: cyg Simple <cygsimple@gmail.com>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] Updated [test]: grep-3.0-2
Date: Fri, 17 Feb 2017 16:43:00 -0000	[thread overview]
Message-ID: <7326506c-5785-001c-0613-be94257689d8@gmail.com> (raw)
In-Reply-To: <58a5299d.26149d0a.a2c17.d033@mx.google.com>

On 2/15/2017 11:25 PM, Steven Penny wrote:
>> Since this includes pipelines by default, this means that if you pipe text
>> data through a pipeline (such as the output of a windows program), you may
>> need to insert a call to d2u to sanitize your input before passing it to grep.
> 
> This is certainly a good way to do it, but for more portable solution use tr:
> 

There are as many ways to remove the \r as there are ways to create
them. By stating this you've convoluted the point Eric was trying to
make which was more a caution than a way to get rid of unexpected data.
You could use d2u, tr, sed, vi, foo, bar, baz, etc.  It doesn't matter
what you use to rid your piped process of excess data as long as the
excess data is removed.  Certainly portability should be a concern if
you're distributing the process or using differing systems with the same
process but we're talking about a Windows only type of issue since the
processes on *NIX will never return \r\n without some planned reason to
do so.

-- 
cyg Simple

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

  parent reply	other threads:[~2017-02-17 16:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 16:20 Eric Blake (cygwin)
2017-02-16  4:25 ` Steven Penny
2017-02-16  6:17   ` Brian Inglis
2017-02-17 16:43   ` cyg Simple [this message]
2017-02-17 23:42     ` Steven Penny
2017-02-18 13:00       ` Eric Blake

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=7326506c-5785-001c-0613-be94257689d8@gmail.com \
    --to=cygsimple@gmail.com \
    --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).