What grep command will include the current function name in its output?

前端 未结 9 2175
夕颜
夕颜 2021-01-07 18:08

I run diff with the -p option so the output will include the name of the function where each change occurred. Is there an analogous option for

9条回答
  •  悲哀的现实
    2021-01-07 18:33

    Actually "grep -p" has been a fixture in AIX for the last two decades from what I can recall. It is out there, and it's just a matter of porting the behaviour over in fresh code.

    It's crude, though, and may need help to know that blank lines within a function don't count.

提交回复
热议问题