This is the mail archive of the
cygwin
mailing list for the Cygwin project.
sed end of line
- From: Timo Maier <tam at diotec dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 15 Mar 2019 10:51:40 +0100
- Subject: sed end of line
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