aboutsummaryrefslogtreecommitdiff
path: root/bin/rfct.awk
blob: 4467f2062058b66ab882ad5f3de3f62afa8cada9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Format an RFC in text format for terminal reading

# A record is a paragraph
BEGIN {
    RS = ""
    ORS = "\n\n"
}

# Strip out control characters, except tab and newline
{ gsub(/[^[:print:]\n\t]/, "") }

# If there's anything left, print it
length($0)