2 added 8 characters in body
source | link

Here is a way to achieve what you expect. Since you stated that you have thousands of patterns, so I'm assuming you feed patterns from a file, then that's much better than passing direct patterns to grep. The command is as following.

grep -oif ../patt_file file_*file* && 
    printf "%s %s\n"Not Found.\n" $(grep -vFxf <(grep -oihf ../patt_file file_*file*) \
    <(< ../patt_file)) "not found"

To avoid matching patterns file patt_file itself, you need to move it to different directory than where your input infiles* are there.

Here is a way to achieve what you expect. Since you stated that you have thousands of patterns, so I'm assuming you feed patterns from a file, then that's much better than passing direct patterns to grep. The command is as following.

grep -oif ../patt_file file_* && 
    printf "%s %s\n" $(grep -vFxf <(grep -oihf ../patt_file file_*) \
    <(< ../patt_file)) "not found"

To avoid matching patterns file patt_file itself, you need to move it to different directory than where your input infiles* are there.

Here is a way to achieve what you expect. Since you stated that you have thousands of patterns, so I'm assuming you feed patterns from a file, then that's much better than passing direct patterns to grep. The command is as following.

grep -oif ../patt_file file* && 
    printf "%s Not Found.\n" $(grep -vFxf <(grep -oihf ../patt_file file*) \
    <(< ../patt_file))

To avoid matching patterns file patt_file itself, you need to move it to different directory than where your input infiles* are there.

1
source | link

Here is a way to achieve what you expect. Since you stated that you have thousands of patterns, so I'm assuming you feed patterns from a file, then that's much better than passing direct patterns to grep. The command is as following.

grep -oif ../patt_file file_* && 
    printf "%s %s\n" $(grep -vFxf <(grep -oihf ../patt_file file_*) \
    <(< ../patt_file)) "not found"

To avoid matching patterns file patt_file itself, you need to move it to different directory than where your input infiles* are there.