How is it possible to get the exit code of the grep command launched in a find:
eg:
find ./export-`date +%Y%m%d`-*/instance.log -type f -exec grep -i -m1 error {} \;
Whether the word "error" is found in the file or not it return the exit code 0
The content of instance.log is as follows:
2016-09-30 09:01:20 : ERROR2 (16)