Linux命令:grep,报错Binary file (standard input) matches

在Linux使用grep命令,从文件中抓取显示特定的信息,如下:

cat 文件名 | grep 特定条件 --->   cat xxxx | grep 12345

结果报错:Binary file (standard input) matches;经过查询后,意思为文件是二进制文件,不能直接grep,解决办法:

cat 文件名 | grep -a 特定条件 ---> cat xxxx | grep -a 12345

原文地址:https://www.cnblogs.com/mfryf/p/3656390.html