[BusyBox 0001314]: sed output incorrect in substitution
bugs at busybox.net
bugs at busybox.net
Fri Apr 13 20:29:07 UTC 2007
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=1314
======================================================================
Reported By: kiltedknight
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 1314
Category: Other
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
======================================================================
Date Submitted: 04-13-2007 13:19 PDT
Last Modified: 04-13-2007 13:29 PDT
======================================================================
Summary: sed output incorrect in substitution
Description:
Running the recently patched sed given the following input (3 lines):
6f 0e fc c6 dd c6 23 af 76 5a 1f e6 6f 34 e2 a3
47 ff 17 ba 8c f7 7e d1 61 00 00
and the following command:
sed -e 's/ *$//g' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
Resulting output:
"\x6f\x0e\xfc\xc6\xdd\xc6\x23\xaf\x76\x5a\x1f\xe6\x6f\x34\xe2\xa3"
"\x47\xff\x17\xba\x8c\xf7\x7e\xd1\x61\x00\x00\x \x \x \x \x "
""
When run on a linux box, the resulting output is:
"\x6f\x0e\xfc\xc6\xdd\xc6\x23\xaf\x76\x5a\x1f\xe6\x6f\x34\xe2\xa3"
"\x47\xff\x17\xba\x8c\xf7\x7e\xd1\x61\x00\x00"
""
Adding an additional "-e 's/\\x //g'" does not remove it from the output
either. Only piping it to a new sed command will remove the excess "\x "
from the end.
======================================================================
----------------------------------------------------------------------
kiltedknight - 04-13-07 13:29
----------------------------------------------------------------------
OK... it executes the commands given in reverse order instead of the order
given on the command line.
Issue History
Date Modified Username Field Change
======================================================================
04-13-07 13:19 kiltedknight New Issue
04-13-07 13:19 kiltedknight Status new => assigned
04-13-07 13:19 kiltedknight Assigned To => BusyBox
04-13-07 13:20 kiltedknight Issue Monitored: kiltedknight
04-13-07 13:29 kiltedknight Note Added: 0002315
======================================================================
More information about the busybox-cvs
mailing list