aboutsummaryrefslogblamecommitdiff
path: root/bin/rfct.awk
blob: 53e948b2a5cf5a08f1b09ce903a1523ffd010612 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                                                   









                                                       
               


                                          
# 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 }