Replace nulls with abc

By definition a file with a null byte is not a text file.
Further, a string in C is null-terminated. You cannot use the standard string functions like strcpy() if there are null bytes in the input data.
Tools like sed and awk are written in C; extra effort is necessary to handle null bytes nevertheless.
Obviously this was done in perl and GNU sed, but not in a Unix sed and awk.

3 Likes