[BusyBox-cvs] [BusyBox 0000248]: sed y// doesn't behave as defined by standard sed

bugs at busybox.net bugs at busybox.net
Fri May 6 22:57:21 UTC 2005


The following issue has been SUBMITTED.
======================================================================
<http://busybox.net/bugs/view.php?id=248> 
======================================================================
Reported By:                keithel
Assigned To:                BusyBox
======================================================================
Project:                    BusyBox
Issue ID:                   248
Category:                   Other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
======================================================================
Date Submitted:             05-06-2005 15:57 PDT
Last Modified:              05-06-2005 15:57 PDT
======================================================================
Summary:                    sed y// doesn't behave as defined by standard sed
Description: 
The y// text transformation command in busybox sed does not function
properly.

here's an example (rot13 of "Hello World!"):
echo 'Hello World!' | sed -e
'y/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM/'

standard gnu sed output: Uryyb Jbeyq!
busybox sed output:      Hellb Jbeld!

The output appears as though the replacement happened for each replacement
set over the whole string each time, iteratively.  So, all a's in the
string are replaced by n, b's replaced by o, [...] n's replaced by a (even
ones that were originally a, replaced by n when that first happened).

This should not happen, once a replacement happens, the character should
be taken out of the list.

======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
05-06-05 15:57 keithel        New Issue                                    
======================================================================




More information about the busybox-cvs mailing list