sed problems with hexadecimal substitutions
Andre
armcc2000 at yahoo.com
Mon Jan 15 18:48:24 PST 2007
I'm trying to use Busybox sed for quick and dirty UTF16 to ascii
conversion:
$ xxd tst.uft16
0000000: 6100 6200 6300 3100 3200 3300 0a a.b.c.1.2.3..
GNU sed version 4.1.2 gives the expected result:
$ sed 's/\x00//g' < tst.uft16 | xxd
0000000: 6162 6331 3233 0a abc123.
Busybox 1.3.1 sed doesn't seem to do anything:
$ busybox-1.3.1 sed 's/\x00//g' < tst.uft16 | xxd
0000000: 6100 6200 6300 3100 3200 3300 0a a.b.c.1.2.3..
Busybox 1.2.1 sed removes the \x00 chars, but then adds spurious
newline chars after every conversion...
$ busybox-1.2.1 sed 's/\x00//g' < tst.uft16 | xxd
0000000: 610a 620a 630a 310a 320a 330a 0a a.b.c.1.2.3..
____________________________________________________________________________________
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265
More information about the busybox
mailing list