ver*_*rdy 7 ubuntu search text-processing text dictionary
如何通过linux命令行查找并打印文件中包含的英文单词?
don*_*lly 11
GNU grep 有以下选项:
grep --only-matching --ignore-case --fixed-strings --file /usr/share/dict/british-english-insane /path/to/file.txt
Run Code Online (Sandbox Code Playgroud)
这将输出每行一个找到的字符串。这/usr/share/dict/british-english-insane是 Debian 软件包提供的词表wbritish-insane。