Here's another example of strangeness in the NUL/control character handling
I was trying to get a line with just one control character to test the
character-72 bug I mentioned,
but regexes seem not to work with lines containing NULs.
The following regex should delete all characters from the line except
for the last one.
$ ed -p /bin/ls
*l
\003\364\377\005\b\002\030\003\024\021\027\320\223\004\b\021\230\223\004\
\b\0228\023\b\376\377\377o\310\222\004\b\377\377\377o\003\360\377\377o\342\
...
\003\300\002\006\b\300r\001`\f \343\001\300r\001\b\001\001\003\310r\001\362\
\001$
*s/^.*\(.\)$/\1/
?
*H
No match
*
M
_______________________________________________
bug-ed mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-ed