diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-11 00:05:17 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-11 00:05:27 +1300 |
commit | 52ec063c6e1972e8ca38fcb3ad2fa8327df79854 (patch) | |
tree | 1b03660b953381e920f1dc61e3f2e41cb52423f0 /bin/rfct.awk | |
parent | Explicitly set flag value in mftl(1df) (diff) | |
download | dotfiles-52ec063c6e1972e8ca38fcb3ad2fa8327df79854.tar.gz dotfiles-52ec063c6e1972e8ca38fcb3ad2fa8327df79854.zip |
Condense conditions for rfct(1df)
Diffstat (limited to 'bin/rfct.awk')
-rw-r--r-- | bin/rfct.awk | 11 |
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 } |