I was using the following bash command inside the emacs compile command to search C++ source code:
grep -inr --include='.h' --include='.cpp' '"' * | sed "/include/d" | sed "/_T/d" | sed '/^ *\/\//d' | sed '/extern/d'
Emacs will then position me in the correct file and at the correct line number so I can edit it appropriate.
I want to locate all the string literals in my source code of the form "xyz" and convert them to invoke a macro so they look like this: _T("xyz") where _T is a macro.
The problem with the above grep and sed commands is that it locates quotes inside the slash-star star-slash comments. How can I write a script that does not match inside /* and */?
Thanks,
siegfried