I'm having trouble doing a search through a directory on a specific files type and outputing the filename that the test is in along with the line number and text line.
searches everything fine, but it includes all files (object files, makefiles, binaries, and source files) and I only care about certain ones.
when I try
Code:
find . -type f -path *.c -exec grep -rn V_BOOLEAN {} \;
I get just the line of text in the file where it appears and the line number. But it doesn't tell me what file it appears in. Adding -l to grep gives just the file names. Is it possible to get all 3? The file name, the line of text, and the line number like grep -rn gives?
*edit: I also tried to compile cscope, but it just complains it can't find regex.h even though it's sitting right there in /usr/include with all the other headers.