summaryrefslogtreecommitdiff
path: root/bin/man2html2.awk
blob: 149c939ce181bba034ee6627b571ca9b74a0e55f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/gawk

$0 ~ "</pre><H2>SEE ALSO</H2>" {
  print $0
  getline
  while ( $0 !~ "^<P>$" && $0 !~ "^[ \t]*$" ) {
    gsub("OTC[_a-zA-Z0-9]*_[_a-zA-Z0-9]*","<A HREF=\"&.html\">&</A>",$0)
    gsub("OUX[_a-zA-Z0-9]*_[_a-zA-Z0-9]*","<A HREF=\"&.html\">&</A>",$0)
    gsub("OTK[_a-zA-Z0-9]*_[_a-zA-Z0-9]*","<A HREF=\"&.html\">&</A>",$0)
    print $0
    if ( getline <= 0 )
      $0 = ""
  }
  if ( $0 !~ "^[ \t]*$" )
    print $0
}

{ print $0 }