grep 'name' test.txt 时输出 Binary file (standard input) matches grep认为这是二进制文件,解决方案:grep -a。 grep -a 'name' test.txt