I am looking for a way to determine if a certain file contains a certain string. It can be a system call or a C function, it doesn't matter.
I tried with grep, but it doesnt return anything
//name is the directory entry name
char grepcmd[150];
strcpy(grepcmd,"grep -c hello ");
strcat(grepcmd, name);
int status = system(grepcmd);