1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2026-05-09 07:45:50 +00:00

SCCS-file: workman.sh

SCCS-SID: 1.2
This commit is contained in:
Arthur David Olson
2003-11-04 09:35:31 -05:00
committed by Paul Eggert
parent e5aa7c7a1b
commit ed697efc09

View File

@@ -0,0 +1,40 @@
#! /bin/sh
# %W%
tty -s
ttyval=$?
case $# in
0) nroff -man ;;
1) if [ -f $1 ]
then
( echo .hy 0; echo .na ) | nroff -man - "$1"
else
man "$1"
fi ;;
*) man ${1+"$@"} ;;
esac | perl -ne '
if (($. % 66) <= 7) {
next;
}
if (($. % 66) > (66 - 7)) {
next;
}
chomp;
s/.//g;
s/[ ]*$//;
if (/^$/) {
$sawblank = 1;
next;
} else {
if ($sawblank) {
print "\n";
$sawblank = 0;
}
print "$_\n";
}
' | case $ttyval in
0) more ;;
*) cat ;;
esac