I need to match two files and print only those lines that after specific character are not followed only by elements from one of the file.
eg I have two files that look like this:
1A00.pdb_HEM_COA 1A01.pdb_HEM 1A05.pdb_IPM 1A0F.pdb_GTS_4CA 1A0G.pdb_PMP 1A0I.pdb_2CP
COA 2CP 3CP 3HC 4CA 4CO
I want to match them and if it appears that first
_ is only followed by elements from second file then don't print them (example is
1A0I.pdb_2CP). If in other lines it appears that
_ is followed some other element but also by element from second file as well then just delete this element that is common in both files but print the line (example is
1A00.pdb_HEM_COA and printed line should be like
Does anybody has any idea how to do that?