Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Hannu E K Nevalainen" <_garbage_collector_ AT telia DOT com> To: Subject: RE: grep: $ in PATTERN doesn't seem to work properly Date: Sun, 22 Aug 2004 10:58:42 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <20040822000534.GA1110049@hpn5170> X-IsSubscribed: yes >> On Sat, 21 Aug 2004, Hannu E K Nevalainen wrote: >> >>> Note that there is a difference depending on how you create the >>> file; I'll hand over to cygwin-specialists to explain (or ponder >>> on) why it has to be this way. >>> >>> I'm running BINARY mounts all over, still I get the behaviour >>> below. > On Sat, Aug 21, 2004 at 07:07:21PM -0400, Igor Pechtchanski wrote: >> This has to do with the way "cat" behaves. By default, Windows sends >> textmode line endings from the console. Most applications >> (including od, echo, bash, etc) compensate for this somehow, except >> "cat", which *always* replicates the output character by character, >> doing no processing *whatsoever*. AFAIK, this is by design. >> >> Case in point: >> >> $ od -c >> >> 0000000 \n >> 0000001 >> $ cat | od -c >> >> 0000000 \r \n >> 0000002 >> $ perl -pe 1 | od -c >> >> 0000000 \n >> 0000001 >> $ # Note, however: >> $ perl -pe 1 | cat | od -c >> >> 0000000 \n >> 0000001 >> $ > > See also > I once sent a patch to a transient coreutils maintainer but > there was no followup. > > Pierre $ type -a cat cat is /usr/bin/cat cat is /bin/cat $ cygcheck -f /bin/cat textutils-2.0.21-1 I would appreciate if this DOS-text-ism could be removed. Would applying the above patch have hard to handle side effects? I guess some important scripts could be affected :-7 ... /Hannu E K Nevalainen, B.Sc. EE Microcomputer systems --72--> ** mailing list preference; please keep replies on list ** -- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); -- --END OF MESSAGE-- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/