diff options
Diffstat (limited to 'workman.sh')
| -rw-r--r-- | workman.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/workman.sh b/workman.sh new file mode 100644 index 000000000000..2fbb7e211c6c --- /dev/null +++ b/workman.sh @@ -0,0 +1,32 @@ +#! /bin/sh + +# <pre> +# @(#)workman.sh 8.2 +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# Tell groff not to emit SGR escape sequences (ANSI color escapes). +GROFF_NO_SGR=1 +export GROFF_NO_SGR + +echo ".am TH +.hy 0 +.na +.. +.rm }H +.rm }F" | nroff -man - ${1+"$@"} | perl -ne ' + chomp; + s/.\010//g; + s/\s*$//; + if (/^$/) { + $sawblank = 1; + next; + } else { + if ($sawblank && $didprint) { + print "\n"; + $sawblank = 0; + } + print "$_\n"; + $didprint = 1; + } +' |
