Reading man pages in the current directory

Author: midan23

This is a tutorial from macosxhints.com
(If you use this on your site, please do not edit anything, including this information at the top.)

***************************************************************************
Reading man pages in the current directory
ÊThu, Apr 3 ’03 at 09:57AM ¥ from: midan23 Ê

Sometimes you want to take a look at a ‘man’ page that is not in the MANPATH or in a directory where man searches for it … as a possible example, when looking at a package you’re about to install. Newer GNU-versions of ‘man’ have a switch for this, but the Jaguar-version doesn’t have it … so here’s a little shell script that does the job :
#!/bin/sh
#
# format and display a file like man
#
[ -z $1 ] && echo “Usage : $(basename $0) file” && exit 1
groff -mman -TASCII $1 | less

Just put it in a folder in your search path to use it. Oh and don’t forget to make it executable with chmod +x script_name.

Hope this can help someone someday…

**********
Article from MacHacking.net Knowledge Base: http://kb.machacking.net

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: