Display filename before matching line

后端 未结 6 445
挽巷
挽巷 2020-11-30 16:28

How can I get grep to display the filename before the matching lines in its output?

6条回答
  •  情话喂你
    2020-11-30 17:31

    This is a slight modification from a previous solution. My example looks for stderr redirection in bash scripts: grep '2>' $(find . -name "*.bash")

提交回复
热议问题