The following awk script should print all strings from the input file with the exemption of the strings that begings with the “HETATM” and contains somewhere in the same string “lig” or “lih” patterns
awk '!/^HETATM/ && /lig|lih |^END/; END {print "END"}' test.pdb >> ./processed.pdb
but in fact it removes almost all lines produccing empty file. What should be corrected ?