更新时间:2021-10-30 07:53:50
grep -roh aaa .|wc -w
递归地grep当前目录中的所有文件和目录搜索aaa,并仅输出匹配项,而不是整行.然后,只需使用 wc
来计算有多少单词.
Grep recursively all files and directories in the current dir searching for aaa, and output only the matches, not the entire line. Then, just use wc
to count how many words are there.