public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* sed match DOS end of line
@ 2013-06-27 14:24 Paul Becker
  2013-06-27 14:49 ` Corinna Vinschen
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Becker @ 2013-06-27 14:24 UTC (permalink / raw)
  To: cygwin

> From: On Behalf Of Corinna Vinschen
> Sent: Thursday, June 27, 2013 6:49 AM
> Subject: [ANNOUNCEMENT] Updated: sed-4.2.2-2
> 
> I've just updated the Cygwin 32 and 64 bit version of sed to 4.2.2-2.

Since this 'sed' change, I noticed that "$" does not match a dos formatted file end-of-line anymore.

example:
echo "endofline^M" | sed "s/e$/X/"

sed 4.2.1 returns
   endoflinX

sed 4.2.2 returns
   endofline

I don’t know if this is better or worse, or expected or not, but it is easy enough to fix my broken scripts.
Scripts will be less portable between windows and linux now unless I take this into consideration.
(and replace "$" with "^M*$")

$ echo $LC_COLLATE

$ echo $LANG
en_US.UTF-8

--
Paul




^ permalink raw reply	[flat|nested] 9+ messages in thread
* sed match DOS end of line
@ 2018-01-07  0:25 Steve Harlow
  2018-01-07  2:16 ` Steven Penny
  0 siblings, 1 reply; 9+ messages in thread
From: Steve Harlow @ 2018-01-07  0:25 UTC (permalink / raw)
  To: cygwin


Greetings,

With 'sed' (GNU sed) version 4.4 I am seeing that '$' doesn't match end 
of line with windows type text files.
It looks like something like this happened and was fixed on version 4.2.2.
https://cygwin.com/ml/cygwin/2013-06/msg00685.html

Here is the original complaint at the time.  I'm seeing the same thing 
with version 4.4.
https://cygwin.com/ml/cygwin/2013-06/msg00673.html

Do I not have some environment variable set correctly? Is this a bug in sed?

I see that I can install the older version, 4.2.2.3.  Looks like that 
might take a step backwards on some libraries too. compiler-rt(5.0.1-1), 
libc++devel (5.0.1-1), libc++1 (5.0.1-1), etc.  Is that the right way to go?

Regards,
Steve


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-07  2:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27 14:24 sed match DOS end of line Paul Becker
2013-06-27 14:49 ` Corinna Vinschen
2013-06-27 15:16   ` autoreconf/gettext puzzle (was Re: sed match DOS end of line) Corinna Vinschen
2013-06-27 15:42     ` Corinna Vinschen
2013-06-27 15:51     ` Yaakov (Cygwin/X)
2013-06-27 15:55       ` Corinna Vinschen
2013-06-27 17:31         ` Corinna Vinschen
2018-01-07  0:25 sed match DOS end of line Steve Harlow
2018-01-07  2:16 ` Steven Penny

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