在Linux使用grep命令,从文件中抓取显示特定的信息,如下:
cat 文件名 | grep 特定条件 ---> cat xxxx | grep 12345
结果报错:Binary file (standard input) matches;经过查询后,意思为文件是二进制文件,不能直接grep,解决办法:
cat 文件名 | grep -a 特定条件 ---> cat xxxx | grep -a 12345
在Linux使用grep命令,从文件中抓取显示特定的信息,如下:
cat 文件名 | grep 特定条件 ---> cat xxxx | grep 12345
结果报错:Binary file (standard input) matches;经过查询后,意思为文件是二进制文件,不能直接grep,解决办法:
cat 文件名 | grep -a 特定条件 ---> cat xxxx | grep -a 12345
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。