This is the mail archive of the
cygwin
mailing list for the Cygwin project.
sed match DOS end of line
- From: Paul Becker <pbecker at unidesk dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Thu, 27 Jun 2013 13:28:39 +0000
- Subject: sed match DOS end of line
> 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