grep without showing path/file:line

前端 未结 3 621
难免孤独
难免孤独 2020-11-30 19:59

How do you grep and only return the matching line? i.e. The path/filename is omitted from the results.

In this case I want to look in all .bar files in the current d

3条回答
  •  借酒劲吻你
    2020-11-30 20:52

    From the man page:

    -h, --no-filename
        Suppress the prefixing of file names on output. This is the default when there
        is only one file (or only standard input) to search.
    

提交回复
热议问题