From: Timo Maier <tam@diotec.com>
To: cygwin@cygwin.com
Subject: sed end of line
Date: Fri, 15 Mar 2019 09:51:00 -0000 [thread overview]
Message-ID: <5C8B75AC.8020002@diotec.com> (raw)
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
next reply other threads:[~2019-03-15 9:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-15 9:51 Timo Maier [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5C8B75AC.8020002@diotec.com \
--to=tam@diotec.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).