diff options
Diffstat (limited to 'bin/rfct.awk')
-rw-r--r-- | bin/rfct.awk | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/rfct.awk b/bin/rfct.awk index 256841a7..3d942b58 100644 --- a/bin/rfct.awk +++ b/bin/rfct.awk @@ -6,11 +6,12 @@ BEGIN { ORS = "\n\n" } -{ - # Strip out control characters, except tab and newline - gsub(/[^[:print:]\n\t]/, "") +# Skip paragraphs with ^L chars in them, as they likely contain headers and +# footers +/\f/ { next } - # If there's anything left, print it - if (length) - print -} +# Strip out other control characters, but allow newline and tab +{ gsub(/[\a\b\r\v]/, "") } + +# If there's anything left after that, print it +length($0) |