File: help2man.awk

package info (click to toggle)
gliv 1.9.7-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 5,780 kB
  • ctags: 4,039
  • sloc: ansic: 30,070; sh: 5,207; makefile: 740; yacc: 291; awk: 185; sed: 16
file content (34 lines) | stat: -rw-r--r-- 502 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$0 == "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" {
    if (started)
        # The end.
        exit

    # The beginning.
    started = 1
    getline
}

/.*: .*/ { # A keyboard accelerator line.
    if (started) {
        print
        print ".br"
    }
}

$0 == "" {
    if (started) {
        # End of keyboard accelerators.
        misc = 1
        RS = "\n\n"
        getline
        print ""
    }
}

{
    if (misc) {
        gsub(/(\n|  )/, " ")
        print
        print ".br\n"
    }
}