$ diff --help | grep -e --show-c-function -p --show-c-function Show which C function each change is in. Will diff -p behaves reasonably when applied to non C files? I want to use the -p option in a script that does not necessarily act on C files?