I want to read the manpage for the application cutechess, however I do not want to install it, so is there any way to get and read a manpage for a package without installing it? That is through the command-line and not a browser (a Terminal browser such as lynx does not count). This method should work for all packages and not be specific to cutechess though. I am running Ubuntu GNOME 15.04.
Asked
Active
Viewed 142 times
1
3 Answers
4
A manpage for cutechess can be found here This is the results of a simple search for manpage and cutechess
The script below (taken from here) can be used to read manpages from the internet, in a terminal window. Usage is dman <topic>, if the script is saved as dman
#!/bin/sh -e
###############################################################################
# This is the Ubuntu manpage repository generator and interface.
#
# Copyright (C) 2008 Canonical Ltd.
#
# This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>,
# based on a framework by Kees Cook <kees@ubuntu.com>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# On Debian-based systems, the complete text of the GNU General Public
# License can be found in /usr/share/common-licenses/GPL-3
###############################################################################
. /etc/lsb-release
while true; do
case "$1" in
--release)
DISTRIB_CODENAME="$2"
shift 2
;;
*)
break
;;
esac
done
PAGE=`echo "$@" | awk '{print $NF}'`
MAN_ARGS=`echo "$@" | sed "s/\$PAGE$//"`
# Mirror support of man's languages
if [ ! -z "$LANG" ]; then
LOCALE="$LANG"
fi
if [ ! -z "$LC_MESSAGES" ]; then
LOCALE="$LC_MESSAGES"
fi
if echo $LOCALE | grep -q "^en"; then
LOCALE=""
fi
URL="http://manpages.ubuntu.com/manpages.gz/"
mandir=`mktemp -d dman.XXXXXX`
trap "rm -rf $mandir" EXIT HUP INT QUIT TERM
for i in `seq 1 9`; do
man="$mandir/$i"
if wget -O "$man" "$URL/$DISTRIB_CODENAME/$LOCALE/man$i/$PAGE.$i.gz" 2>/dev/null; then
man $MAN_ARGS -l "$man" || true
fi
rm -f "$man"
done
You can also download the script with:
wget http://manpages.ubuntu.com/dman
terdon
- 98,183
- 15
- 197
- 293
Charles Green
- 20,952
- 21
- 60
- 92
-
http://manpages.ubuntu.com/ tells you more about the Ubuntu Manpage Repository and how to use it. – Florian Diesch Oct 21 '15 at 15:20
-
So there is no way of doing this through Terminal rather than in a browser (a Terminal browser such as `lynx` does not count) as I specified? – Oct 21 '15 at 15:23
-
1@ParanoidPanda There is a way: The script `dman` will allow you to read manpages from the internet, using a terminal interface. It can be found at manpages.ubuntu.com, which, unfortunately, you will need a browser to find :) – Charles Green Oct 21 '15 at 15:27
-
@CharlesGreen: Well, you could always paste the script here and then link to where you got it from. I would find that to be an acceptable answer. :) – Oct 21 '15 at 15:29
-
@ParanoidPanda, yeah, but then you'd need a browser to read the script here! – Charles Green Oct 21 '15 at 15:44
-
1@CharlesGreen: You can download the script with `wget http://manpages.ubuntu.com/dman` and then `chmod +x ./dman`.... or is `wget` forbidden too ;-)? – Rmano Oct 21 '15 at 15:44
-
@Rmano Not sure of the rules about that. Interestingly, I did wget the script, chmod and attempt to execute. Didn't seem to work, but I'll try again later... – Charles Green Oct 21 '15 at 15:50
-
1works for me --- did you remember to call it with `./dman cutechess`? `.` is not normally in the PATH for safety reasons. – Rmano Oct 21 '15 at 15:54
-
Is it in your path @CharlesGreen? It worked for me if I called from the within the same directory with `./dman
` – Arronical Oct 21 '15 at 15:55 -
@Arronical Seems to be a release issue. I'm actually going to mark this question as a duplicate, and recommend installation of the package `bikeshed` – Charles Green Oct 21 '15 at 15:59
2
The dman script which should allow you to browse the Ubuntu man pages found at http://manpages.ubuntu.com/dman can be fetched via the command line using wget:
wget http://manpages.ubuntu.com/dman
Make sure the working dman is in your path and executable, and you should be able to call it like any other command line utility.
Arronical
- 19,653
- 18
- 73
- 128
-
Thanks! I should be able to remember there's a command to get webpages, but for some reason I never do. I corrected your text for the weblink. – Charles Green Oct 21 '15 at 15:46
-
Thanks @CharlesGreen , overly speedy fingers by me there! I rarely remember either, looking at the manpages just prompted an 'I wonder' moment. – Arronical Oct 21 '15 at 15:49
1
All of Ubuntu's man pages, for all currently supported releases, are available through Ubuntu's online man pages
waltinator
- 35,099
- 19
- 57
- 93
-
Does seriously nobody listen? I don't want the answer to be to go into a browser and to go to a website, I want the answer to be fully using the command-line (and a command-line browser such as `lynx` does not count). Is there really no way to do it this way? – Oct 21 '15 at 15:27
-
How do you expect such a thing without actually downloading the relevant application? Once you do that, pipe the man output to a file so it stays with you and then delete the app. – DK Bose Oct 21 '15 at 17:02