original netbsd's tr(1)
[minix.git] / commands / zoneinfo / workman.sh
blob1ea32fc1e39762fc35942849d410663b2053265e
1 #! /bin/sh
3 # @(#)workman.sh 1.8
5 # Tell groff not to emit SGR escape sequences (ANSI color escapes).
6 GROFF_NO_SGR=1
7 export GROFF_NO_SGR
9 echo ".am TH
10 .hy 0
11 .na
13 .rm }H
14 .rm }F" | nroff -man - ${1+"$@"} | perl -ne '
15 chomp;
16 s/.\010//g;
17 s/\s*$//;
18 if (/^$/) {
19 $sawblank = 1;
20 next;
21 } else {
22 if ($sawblank && $didprint) {
23 print "\n";
24 $sawblank = 0;
26 print "$_\n";
27 $didprint = 1;