Further to the earlier query posted Using find with sh - command not working
find . -type f -name '*FW*' -exec grep -iEq 'chmod.*archive|archive.*chmod' {} \; -ls
This cmd was not able to find the files when "archive" or "chmod" text is found in multiple lines. However it is able to scan the files , when "chmod" and "archive" text is found in the same line.
So tried with this command , but it doesnt give the desired o/p
1> find . -type f -name '*FW*' -exec grep -iEq 'chmod.*' {} \; -ls -exec grep -iEq '.*archive.*' {} +
Why this cmd doesnt give the desired o/p?
TRied with this command , it gives the result as expected but it fails intermittently with this error "find: 'pcregrep' terminated by signal 11'
2> find . -type f -name '*FW*' -exec pcregrep -qM 'chmod.*(\n|.)*archive.*' {} \; -ls
Why it is failing with the error?