Awk Search text string in field, not all in field.

Hello, I am using awk to match text in a tab separated field and am able to do so when matching the exact word. My problem is that I would like to match any sequence of text in the tab-separated field without having to match it all. Any help will be appreciated. Please see the code below.

awk -F'[\t]' 'NR==FNR{a[$0]; next} $6 in a{print > "/path/output_file"}' /path/list_of_text_to_match /path/list_of_text_to_search_from

Thanks in advance!

Try this:

grep -f strings.txt <(awk -F"\t" '{print $6}' input.txt)

where strings.txt contains the strings to search for, one per line.

grep -f strings.txt <(awk -F"\t" '{print $6}' input.txt)

This is mostly what I am looking for. How can I modify this to print the whole line instead of just tab separated field 6?

Hmm... I think using just awk may be easier after all:

awk -F"\t" 'BEGIN{
  while(getline < "strings.txt")
     a[$0]=$0 }  #read in the strings and store in array
{
  for(i in a)        #loop through stored string
    if($6~a)    
      {print $0; next}   #match; print and go to next line
}' input.txt