From 52ec063c6e1972e8ca38fcb3ad2fa8327df79854 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 11 Dec 2016 00:05:17 +1300 Subject: Condense conditions for rfct(1df) --- bin/rfct.awk | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/rfct.awk b/bin/rfct.awk index 53e948b2..3cd32e40 100644 --- a/bin/rfct.awk +++ b/bin/rfct.awk @@ -5,11 +5,6 @@ BEGIN { RS="" } -# Skip any block without at least one alphanumeric char -!/[[:alnum:]]/ { next } - -# Skip any block with a page break marker in it -/\x0c/ { next } - -# Print the block followed by two newlines -{ printf "%s\n\n", $0 } +# Print the block followed by two newlines, as long as it has at least one +# alphanumeric character and no pagebreak characters +/[a-zA-Z0-9]/ && !/\x0c/ { printf "%s\n\n", $0 } -- cgit v1.2.3