答案 0 :(得分:3)
因为s*
告诉grep匹配s
零或更多次。您似乎混淆了正则表达式和文件搜索模式。如果您只需要输出pcs
+的行,只需使用pcs
作为正则表达式:
lsmod |grep --color=auto pcs
答案 1 :(得分:2)
man grep
:
A regular expression may be followed by one of several repetition
operators:
* The preceding item will be matched zero or more times.
+ The preceding item will be matched one or more times.