i have two files, file1 have a column with ~600 row and file2 have ~20 columns and ~3000 row. i want to find patterns form file1 that are common in file2.file1:K00001K00002K00003K00006K00013K00025K00089file2:TRINITY_DN102283_c0_g1  KEGG:xtr:496432`KO:K16860TRINITY_DN42420_c0_g1   KO:K01762TRINITY_DN52581_c0_g1   KEGG:zma:732844`KO:K13523TRINITY_DN36387_c0_g2   KEGG:zma:732811`KO:K00089TRINITY_DN54650_c4_g1   KEGG:zma:542598`KO:K00025TRINITY_DN93494_c0_g1   KEGG:zma:542598`KO:K00025TRINITY_DN36051_c0_g1   KEGG:zma:542598`KO:K00025i would like obtain a result like this:K00025K00089
find common patterns btween two files
grep
You can do this with the following snippetgrep -f file1 -o file2 | sort -uK00025K00089