On 02/02/2018 09:29 PM, Linda Walsh wrote:
I've used grep to search for strings across all my mailboxes for decades. Found out today, it randomly doesn't work based on whether or not the file contains any text that doesn't comply with POSIX.
So if one user has UTF-8 encoding and another, ISO-8859-1, and they are in the same mailbox, according to POSIX, that's a binary file.
yes, IMO Eric Blake explained that quite well: https://lists.gnu.org/r/bug-grep/2018-02/msg00001.html
You have to tell grep to search (and potentially display) binary data [...].
I don't think so - but you have to tell it to process the file single-byte-wise instead of trying to conform to a certain single locale (which is impossible in that case). Again, Eric showed you the way: $ LC_ALL=C grep ...
Note the last line is the prompt same text as you can see at top of window.
I don't see what "head -3 /bin/bash" has to do with the output of grep or your $SUBJECT at all (apart from the term "binary"). Apropos standards: "head -NUM" is obsolete and non-portable syntax: https://www.gnu.org/software/coreutils/head Use "head -n NUM" instead. ;-) Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org