pw-apply: Use awk for multi-line subject line extraction

Instead of using experimental `grep -P` which doesn't work in some
distros, do it with line-by-line AWK script which collects all line
beginning with the line that starts with "Subject: " and ending before
hitting the line starting with another "<keyword>: ". This works for
single-line and multi-line subjects.

Signed-off-by: Andrii Nakryiko <>
Signed-off-by: Daniel Borkmann <>
1 file changed