baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
- From: Lee Forrest <lforrestster AT gmail.com>
- To: baslinux AT lists.ibiblio.org
- Subject: Re: [BL] Fixed My Man Script (take two)
- Date: Sat, 30 Dec 2006 20:32:17 +0000
Let's try again, with another fix and an improvement:
(I neglected to include full paths to all the files referred
to.)
On Sat, Dec 30, 2006 at 07:35:52PM +0000, Lee Forrest wrote:
----------
#!/bin/sh
#for plain text man pages gzipped in /usr/man
# put your favorite editor here
ed=/usr/bin/nvi
# assign first arg to man on the commandline to the variable
# 'file'
file=$1
# test if there isn't any such manpage, and if that's the
# case, say so and exit with an error code (1)
if ! test -s /usr/man/${file}.gz
then echo "No Such Manpage"
exit 1
fi
# see if /usr/man/${1}.gz is a symlink.
if test -h /usr/man/${file}.gz
# if it is, extract the name of the manpage, minus the ".gz"
# and assign it to $file
then file=`ls -l /usr/man/${file}.gz | sed -n 's/^\(.* \)\(.*\)\(.gz$\)/\2/p'`
fi
gunzip /usr/man/${file}.gz &&
$ed /usr/man/${file} &&
gzip /usr/man/${file}
----------------
Lee :-/
--
BasicLinux: Small is Beautiful
http://www.basiclinux.com.ru
-
[BL] Fixed My Man Script,
Lee Forrest, 12/30/2006
-
Re: [BL] Fixed My Man Script (take two),
Lee Forrest, 12/30/2006
-
Re: [BL] Fixed My Man Script (take two),
Karolis Lyvens, 12/31/2006
- Re: [BL] Fixed My Man Script (take two), Lee Forrest, 12/31/2006
-
Re: [BL] Fixed My Man Script (take two),
Karolis Lyvens, 12/31/2006
-
Re: [BL] Fixed My Man Script (take two),
Lee Forrest, 12/30/2006
Archive powered by MHonArc 2.6.24.