Re: sed end of line

2019-03-16 Thread L A Walsh
On 3/15/2019 7:59 PM, Brian Inglis wrote: > On 2019-03-15 04:03, Soegtrop, Michael wrote: > >> you are mixing a DOS echo which will produce a \r\n line ending with a >> Cygwin sed which expects \n line endings. The second . matches the \r. >> Either work in bash and use Cygwin echo or use a MinG

Re: sed end of line

2019-03-15 Thread Brian Inglis
On 2019-03-15 04:03, Soegtrop, Michael wrote: > you are mixing a DOS echo which will produce a \r\n line ending with a > Cygwin sed which expects \n line endings. The second . matches the \r. > Either work in bash and use Cygwin echo or use a MinGW compile of sed or > strip the \r e.g. with tr or

Re: sed end of line

2019-03-15 Thread Timo Maier
Hi Michael. you are mixing a DOS echo which will produce a \r\n line ending with a Cygwin sed which expects \n line endings. I already thought it's something about EOL, just wanted to make sure if this is not a bug. Thanks. -- Timo -- Problem reports: http://cygwin.com/problems.html

RE: sed end of line

2019-03-15 Thread Soegtrop, Michael
Dear Timo, you are mixing a DOS echo which will produce a \r\n line ending with a Cygwin sed which expects \n line endings. The second . matches the \r. Either work in bash and use Cygwin echo or use a MinGW compile of sed or strip the \r e.g. with tr or maybe match it more explicitly with a \r

Re: sed end of line

2019-03-15 Thread Vlado
On 15. 3. 2019 10:51, Timo Maier wrote: Why do I need a second "." in the cygwin sed? Hi Timo. The difference is in echo. $ /bin/echo "Hey" | /usr/bin/hexdump -C 48 65 79 0a |Hey.| 0004 C:\>echo Hey| c:\cygwin\bin\hexdump -C 48 65

sed end of line

2019-03-15 Thread Timo Maier
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 chann