2012-09-26 74 views

回答

3

您需要的grep手冊頁-l選項

-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. (-l is specified by POSIX.) 
+0

*掃描將停在第一場比賽*必須明確,'grep'將停止掃描當前文件,如果它已經被賦予了多個參數(或者對於某些擴展的'grep是'-R'標誌),則繼續下一步。 – kojiro