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

前端 未结 9 2144
夕颜
夕颜 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:13

    You could write a script that grep -vs into a temporary file and then diff -ps that with the original. That way diff would find the lines that grep removed (i.e. the lines that you want), and you would get the exact same function matching.

提交回复
热议问题