grep: input dictionary file. Recursively search DIR for dictionary terms, output found filenames to a file named after dictionary_term : I have a dictionary file:

`dictionary.txt`

it contains the following example IP addresses:
`
1.1.1.1
2.2.2.2
3.3.3.3
`

There are many `IP_files.iplists` within this directory, each IP LIST containing many different IP addresses

I would like to search for: `1.1.1.1` and if this string is found within one of the IP LISTS, then output all found IP LIST filenames (e.g. `IP_files_list1.iplists`) to another file that is named after the dictionary search term (eg. `1.1.1.1.txt`)

Ideally then, `1.1.1.1.txt` containing a list of all of the filenames it was found in

`2.2.2.2.txt` would contain a list of all of the IP LIST filenames it was found in



> `grep -r "1.1.1.1" > 1.1.1.1`
> 
> is about as far as I have come. This creates a file named 1.1.1.1 and
> lists all of the IPLISTS.iplists file names that "1.1.1.1" is found in

. 
> So 1.1.1.1 looks something like this:
> 

`IP_files_list1.iplists
IP_files_list2.iplists
IP_files_list_another_list.iplists`
