t***@inventati.org
2014-09-03 01:09:02 UTC
Hi,
The subject pretty much says it all for this bug. Compare the output of
"echo abc | sed -e 's/b/\x00/' | hexdump -c" and "echo abc | sed -e
'y/b/\x00/' | hexdump -c". The s command behaves correctly (as I would
expect, it replaces the 'b' with a NUL character), while the y command
fails to output anything when it should print NUL, resulting in an
output file shorter than the input was.
Thanks,
table
x86_64 Linux
$ sed --version
sed (GNU sed) 4.2.2
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Jay Fenlason, Tom Lord, Ken Pizzini,
and Paolo Bonzini.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-***@gnu.org>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
The subject pretty much says it all for this bug. Compare the output of
"echo abc | sed -e 's/b/\x00/' | hexdump -c" and "echo abc | sed -e
'y/b/\x00/' | hexdump -c". The s command behaves correctly (as I would
expect, it replaces the 'b' with a NUL character), while the y command
fails to output anything when it should print NUL, resulting in an
output file shorter than the input was.
Thanks,
table
x86_64 Linux
$ sed --version
sed (GNU sed) 4.2.2
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Jay Fenlason, Tom Lord, Ken Pizzini,
and Paolo Bonzini.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-***@gnu.org>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.