diff options
Diffstat (limited to 'bin/rfct.awk')
-rw-r--r-- | bin/rfct.awk | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/rfct.awk b/bin/rfct.awk new file mode 100644 index 00000000..53e948b2 --- /dev/null +++ b/bin/rfct.awk @@ -0,0 +1,15 @@ +# Format an RFC in text format for terminal reading + +# A record is a paragraph +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 } |