I have a big directory tree with sources files (*.c), where some, (but not all), of which are actually generated via a preprocess which produces the whatever.c from a whatever.qc file.
Often, I find myself needing to do something on these files, but only the ultimate source files -- that is, if there is a whatever.qc, there is no point in looking at whatever.c (but if there is no whatsit.qc then I do need to look at whatsit.c).
Starting from something like this:
find data-utils -name '*.qc' -o -name '*.c' | xargs grep SMS_GEN
and lets assume a portion of the output of the find is:
data-utils/whatever.c
data-utils/whatsit.c
data-utils/whatever.qc
Is there some existing tool I can use to filter the output of the find so I don't pass the whatever.c's to xargs (or whatever follows the find). That is, the filtered result from above should be:
data-utils/whatsit.c
data-utils/whatever.qc
Or am I going to need to write something from scratch?