Hello. I'm trying to use grep to get the list of all non-binary files in a given folder. I tried with the 2.20 and the 3.11 release.
For some reason, grep is providing 2 false negatives when the list is huge. This issue does not happen if I break the grep input with "xargs -n X".
Check below:
[opc@oradiff-core dbhome_1]$ find -type f -not -path "./.patch_storage/*" -not -name "tfa_setup" -print0 2>> /tmp/error.list | xargs -0 -n 100 grep -Il '.' > /tmp/list1.list
[opc@oradiff-core dbhome_1]$ find -type f -not -path "./.patch_storage/*" -not -name "tfa_setup" -print0 2>> /tmp/error.list | xargs -0 grep -Il '.' > /tmp/list2.list
[opc@oradiff-core dbhome_1]$ diff /tmp/list1.list /tmp/list2.list12268,12269d12267< ./apex/images/apex_ui/psd/apex_5_ui.ai
[opc@oradiff-core dbhome_1]$ wc -l /tmp/list1.list /tmp/list2.list
23397 /tmp/list1.list
23395 /tmp/list2.list
46792 total
The output should not show any difference.
The same issue was also reproduced in grep 2.20.
Thanks,
Rodrigo