dos*_*der 15
只要grep你的话,然后使用wc -l来计算线条...就像这样
grep '^your_word' /path/to/file | wc -l
Rah*_*thi 11
试试这个:-
awk '/^yourwordtofind/{a++}END{print a}' file
Run Code Online (Sandbox Code Playgroud)
grep -c "pattern" <filename>
Run Code Online (Sandbox Code Playgroud)
例如:如果你想more在一个文件中搜索一个模式test.txt,那么下面是命令:
grep -c "more" test.txt
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
17464 次 |
| 最近记录: |