I am working on writing some scripts to grep certain directories, but these directories contain all sorts of file types.
grep
I want to grep jus
Should write "-exec grep " for each "-o -name "
find . -name '*.h' -exec grep -Hn "CP_Image" {} \; -o -name '*.cpp' -exec grep -Hn "CP_Image" {} \;
Or group them by ( )
find . \( -name '*.h' -o -name '*.cpp' \) -exec grep -Hn "CP_Image" {} \;
option '-Hn' show the file name and line.