On Sat 10 Mar 2018 12:29:54 Ralph Corderoy wrote: > I don't know how all those other commands did. :-) > What's the output of > > dpkg-query -W grep > grep --version > od -tx1z <<<$'x\xa0\xa0y' > LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y' > LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y\nz' > LC_ALL=en_GB.utf8 grep y <<<$'x\xa0\xa0y' > LC_ALL=en_GB.iso88591 grep y <<<$'x\xa0\xa0y' > LC_ALL=C grep y <<<$'x\xa0\xa0y'
All the others are the same as yours. Here it is:- ============================================================================= [derij@pip ~]$ grep --version grep (GNU grep) 2.20 Copyright (C) 2014 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 Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>. [derij@pip ~]$ od -tx1z <<<$'x\xa0\xa0y' 0000000 78 a0 a0 79 0a >x..y.< 0000005 [derij@pip ~]$ LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y' [derij@pip ~]$ LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y\nz' z [derij@pip ~]$ LC_ALL=en_GB.utf8 grep y <<<$'x\xa0\xa0y' x��y [derij@pip ~]$ LC_ALL=en_GB.iso88591 grep y <<<$'x\xa0\xa0y' x��y [derij@pip ~]$ LC_ALL=C grep y <<<$'x\xa0\xa0y' x��y [derij@pip ~]$ urpmq -i grep $MIRRORLIST: media/core/updates/media_info/20180228-135247-info.xml.lzma Name : grep Version : 2.20 Release : 4.1.mga5 Group : Text tools Size : 706453 Architecture: x86_64 Source RPM : grep-2.20-4.1.mga5.src.rpm URL : http://www.gnu.org/software/grep/grep.html Summary : The GNU versions of grep pattern matching utilities Description : The GNU versions of commonly used grep utilities. Grep searches one or more input files for lines which contain a match to a specified pattern and then prints the matching lines. GNU's grep utilities include grep, egrep and fgrep. You should install grep on your system, because it is a very useful utility for searching through text files, for system administration tasks, etc. =========================================================================== I have now run the same commands in VirtualBox on a more recent version of Mageia:- =========================================================================== [derij@localhost ~]$ grep --version grep (GNU grep) 3.0 Copyright (C) 2017 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 Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>. [derij@localhost ~]$ od -tx1z <<<$'x\xa0\xa0y' 0000000 78 a0 a0 79 0a >x..y.< 0000005 [derij@localhost ~]$ LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y' [derij@localhost ~]$ LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y\nz' z [derij@localhost ~]$ LC_ALL=en_GB.utf8 grep y <<<$'x\xa0\xa0y' Binary file (standard input) matches [derij@localhost ~]$ LC_ALL=en_GB.iso88591 grep y <<<$'x\xa0\xa0y' x��y [derij@localhost ~]$ LC_ALL=C grep y <<<$'x\xa0\xa0y' x��y [derij@localhost ~]$ [derij@localhost ~]$ urpmq -i grep Name : grep Version : 3.0 Release : 1.mga6 Group : Text tools Size : 790453 Architecture: x86_64 Source RPM : grep-3.0-1.mga6.src.rpm URL : http://www.gnu.org/software/grep/grep.html Summary : The GNU versions of the grep pattern matching utilities Description : The GNU versions of the commonly used grep utilities. Grep searches one or more input files for lines which contain a match to a specified pattern and then prints the matching lines. GNU's grep utilities include grep, egrep and fgrep. You should install grep on your system, because it is a very useful utility for searching through text files, for system administration tasks, etc. =========================================================================== Now I can see the binary file message, so between versions 2.20 and 3.0 it appears the behaviour changed, or a difference in the environment of my user under VirtualBox. Peter has committed the LC_ALL=C changes so there should not be a problem with either version. Thanks for your help. Cheers Deri