awk 'NR==FNR {SRCSTR=SRCSTR DELIM $0; DELIM="|"; next} gsub (SRCSTR,"&")==2' patternfile mysite-access_log.log