in reply to Re^2: grep for lines containg two variables
in thread grep for lines containg two variables

What if one string is contained in the other but should not be counted?

How about

grep /$string1.*$string2|$string2.*$string1/,