in reply to search and replace (in-place) strings in binary
That technically doesn't open the file in binary mode, but there's no difference between text mode and binary mode (by default) in Linux.
But you are reading the file a line at a time. What's a line in a binary file? That makes no sense. Perhaps you should make it so the entire file is one line by using -0777. (That's a zero.)
|
|---|