I am writing a small Android program that can check how many files contains a certain string without reading completely their contents
Therefore, I've found a good way to do it is using grep -q
command. Because of executing the command doesn't output but a exit code (0 : match, 1 : not match)
However I have no idea that how to get the exit code after executing the command completed by C language in JNI.