From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35117 invoked by alias); 17 Feb 2017 16:43:05 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 35037 invoked by uid 89); 17 Feb 2017 16:43:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=stating, H*r:ip*192.168.0.6 X-HELO: mail-it0-f44.google.com Received: from mail-it0-f44.google.com (HELO mail-it0-f44.google.com) (209.85.214.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Feb 2017 16:43:02 +0000 Received: by mail-it0-f44.google.com with SMTP id h10so25471402ith.1 for ; Fri, 17 Feb 2017 08:43:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=QIsN/Kd6pWC0QPmD9wcMBTHU4bf9u+ySWTteUSU074I=; b=Shq682eIYOQMqIqckY+qyiU86P29nsMqvetNwLgnS3QFjVXuZ0qIdoc62RlmdxgBBg 1DCiokKqfrYRJ9wwYYompwZaX75MJk9w7cdJcOVkzB4a9eI0BVxXluq91F5dsdekBFyH Qc3Rdt7AMfarkBJH/XGK/UXgADZs81FGZcSRZfPBg3J1osoPYuhuFdzY9Z6csJpQuNqA ylPyiR/zMUAY8znafmdBtV4pqjNQNoZ/qajAQiMe1xaTpTIUcmXXLwBDlYr/JXKb0hKm TAI3X5sV6bo6MosEjxXqTW5aVgcBGDyrPRH0hDkrwO+blNa1jHP+qIx0cD1e9GJ0l2Wx Ie+w== X-Gm-Message-State: AMke39m2HOpZwaSRi/k4GK5nPFy9uHRq4cCdLKI5NxGSKCiWNb3JG1ioED9an6sPdp/a8g== X-Received: by 10.36.213.196 with SMTP id a187mr4165071itg.4.1487349779418; Fri, 17 Feb 2017 08:42:59 -0800 (PST) Received: from [192.168.0.6] (d27-96-48-76.nap.wideopenwest.com. [96.27.76.48]) by smtp.gmail.com with ESMTPSA id i89sm1322948ioo.5.2017.02.17.08.42.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Feb 2017 08:42:58 -0800 (PST) Subject: Re: [ANNOUNCEMENT] Updated [test]: grep-3.0-2 To: cygwin@cygwin.com References: <58a5299d.26149d0a.a2c17.d033@mx.google.com> From: cyg Simple Message-ID: <7326506c-5785-001c-0613-be94257689d8@gmail.com> Date: Fri, 17 Feb 2017 16:43:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <58a5299d.26149d0a.a2c17.d033@mx.google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00220.txt.bz2 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