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

猜你喜欢

转载自blog.csdn.net/weixin_39416711/article/details/83539417