根据grep的手册,
-l, --files-with-matches
Suppress normal output; instead print the name of each input
file from which output would normally have been printed. The
scanning will stop on the first match.
grep -l
,这个命令在发现匹配项时会输出包含匹配项的文件名,看起来很好理解。
但是,当我使用grep -ln
时,它会输出匹配项的每一行。
是否意味着grep -l
只找到第一个匹配项就停止扫描,并且grep -ln
忽略了-l
标志?