====== SED - Print - Print paragraph if it contains string1 and string2 and string3 (in any order) ====== Print paragraph if it contains AAA and BBB and CCC (in any order). sed -e '/./{H;$!d;}' -e 'x;/AAA/!d;/BBB/!d;/CCC/!d' **NOTE:** HHsed v1.5 must insert a 'G;' after 'x;'