bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ssed: CR is put in wrong position when $ is used


From: Eric Pement
Subject: ssed: CR is put in wrong position when $ is used
Date: Wed, 29 Aug 2001 13:07:34 -0500

   The following bug occurs with ssed version 3.49, although it's 
been present since version 3.45. ssed adds a carriage return 
character (CR, 0x0D) in the wrong position when the $ metacharacter 
is used in a s/ubstitu/tion/. The carriage return should not be 
added at the match point, but should immediately precede the newline.

   This example demonstrates the bug. My platform is Win98/4DOS, so 
I use "double quotes" around my ssed commands.

----

[1] d:\tmp>>echo hello world | ssed349 "s/$/ -MATCH/"
 -MATCHorld

[1] d:\tmp>>echo hello world | ssed349 "s/$/ -MATCH/" | od -a
0000000   h   e   l   l   o  sp   w   o   r   l   d  cr  sp   -   M   A
0000020   T   C   H  nl
0000024

----

   Compare the foregoing output with GNU sed v3.02.80 ("gsed"):

[1] d:\tmp>>echo hello world | gsed "s/$/ -MATCH/" | od -a
0000000   h   e   l   l   o  sp   w   o   r   l   d  sp   -   M   A   T
0000020   C   H  cr  nl
0000024

   The behavior of GNU sed v3.02.80 is correct in this case.

Kind regards,

Eric Pement

--
Eric Pement - address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]