I’m running GNU find in a QProcess which works just fine.
Nevertheless, when I try to combine it with grep, it does not execute at all.
The QProcess is started with
process->start(findpattern.replace("~",QDir::home().absolutePath()), QProcess::Unbuffered | QProcess::ReadWrite);
When findpattern is e.g.
find "~/Downloads" -name "*.cpp"
this works just fine. But for e.g. finding all cpp files that contain “else”
find "~/Downloads" -name "*.cpp" -exec grep -l "else" {} \;
it fails
What am I doing wrong?
↧