在使用grep搜索特定文本时,报Binary file standard input matches
cat test |grep "quic"
因为文件是二进制文件,在使用grep时,加上 -a参数,-a参数作用是可将二进制档案视为文本文件搜寻,相当于–binary-files=text这个参数
cat test |grep -a "quic"
当遇到二进制文件时,使用grep搜索可能会遇到'Binaryfilestandardinputmatches'的提示。解决方法是在命令中添加'-a'参数,这将使grep把二进制文件当作文本处理。例如,`cattest|grep-aquic`会搜索二进制文件cattest中包含'quic'的文本。
在使用grep搜索特定文本时,报Binary file standard input matches
cat test |grep "quic"
因为文件是二进制文件,在使用grep时,加上 -a参数,-a参数作用是可将二进制档案视为文本文件搜寻,相当于–binary-files=text这个参数
cat test |grep -a "quic"

被折叠的 条评论
为什么被折叠?