public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* sed end of line
@ 2019-03-15  9:51 Timo Maier
  2019-03-15 10:02 ` Vlado
  2019-03-15 10:03 ` Soegtrop, Michael
  0 siblings, 2 replies; 6+ messages in thread
From: Timo Maier @ 2019-03-15  9:51 UTC (permalink / raw)
  To: cygwin

Hello, I have a problem with sed.

Ubuntu:
timo@serv6:~# echo "CHANGE MASTER;" | sed '/^CHANGE MASTER.*/ s/.$/ for channel "de";/'
CHANGE MASTER for channel "de";

Works as expected.

Windows:
C:\> echo CHANGE MASTER;| sed.exe '/^CHANGE MASTER.*/ s/.$/ for channel "de";/'
CHANGE MASTER; for channel "de";

last character ";" is not being deleted

now with a second "." before "$" (to delete last 2 characters):
C:\> echo CHANGE MASTER;| sed.exe '/^CHANGE MASTER.*/ s/..$/ for channel "de";/'
CHANGE MASTER for channel "de";

This is how I want it.

Why do I need a second "." in the cygwin sed?

sed.exe --version
/usr/bin/sed (GNU sed) 4.4
Packaged by Cygwin (4.4-1)

-- 
Timo


--
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] 6+ messages in thread

end of thread, other threads:[~2019-03-16 14:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-15  9:51 sed end of line Timo Maier
2019-03-15 10:02 ` Vlado
2019-03-15 10:03 ` Soegtrop, Michael
2019-03-15 10:33   ` Timo Maier
2019-03-16  2:59   ` Brian Inglis
2019-03-16 14:49     ` L A Walsh

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