aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-11 00:05:17 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-11 00:05:27 +1300
commit52ec063c6e1972e8ca38fcb3ad2fa8327df79854 (patch)
tree1b03660b953381e920f1dc61e3f2e41cb52423f0 /bin
parentExplicitly set flag value in mftl(1df) (diff)
downloaddotfiles-52ec063c6e1972e8ca38fcb3ad2fa8327df79854.tar.gz
dotfiles-52ec063c6e1972e8ca38fcb3ad2fa8327df79854.zip
Condense conditions for rfct(1df)
Diffstat (limited to 'bin')
-rw-r--r--bin/rfct.awk11
1 files changed, 3 insertions, 8 deletions
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 }