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

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