You can do this easily using vim
or gedit
.
As vim
and gedit
can edit the zipped files, you can do :
vim "$(man -w tsql)"
gedit "$(man -w tsql)"
$()
is the shell command substitution pattern, which will be replaced by the output of man -w tsql
. So if the output of man -w tsql
is /usr/share/man/man1/tsql
, the above commands are equivalent to :
vim /usr/share/man/man1/tsql
gedit /usr/share/man/man1/tsql
Even more special would be being able to get this specifically for Lubuntu because there are a few differences in software and I'm an avid Lubuntu user but, if need be, I can make due with just the Ubuntu man-pages.
There are no differences in manpages between Lubuntu and Ubuntu. One of the points of becoming a recognized flavour is using the same repositories as Ubuntu, so the software is identical, it's only the starting points that differ.
Also, http://manpages.ubuntu.com suffers from a bug where identically named manpages from different packages aren't distinguished - the manpages of the last package read show up.
Instead of hammering the manpages site, hammer the repositories.
Get a list of manpages, for, say, the binary-amd64
architecture (should be identical to the others):
mkdir temp
cd temp
curl http://archive.ubuntu.com/ubuntu/dists/wily/Contents-amd64.gz |
gunzip |
grep 'share/man' |
sed 's/.* //;s/,/\n/g' |
awk -F/ '{print $NF}' |
sort -u > packages.txt
while IFS= read -r package
do
apt-get download "$package"
dpkg-deb --fsys-tarfile "$package"*.deb | tar x ./usr/share/man
mkdir "$package"-manpages
find ./usr/share/man/man* -type f -exec mv -t "$package"-manpages {} +
rm "$package"*.deb
for page in "$package"-manpages/*
do
man -t "$page" | ps2pdf - > "$page".pdf
done
done < packages.txt
If course, this is going to consume an insane amount of bandwidth - the repository servers are used to it, the question is: is your network upto the task?
Best Answer
language-pack-<two letter language code>
e.g.
sudo apt-get install language-pack-es
for Spanishmanpages-<two letter language code>
e.g.
apt-get install manpages-es
for Spanish man pages.LANG
environment variable to<language>_<country>.<encoding>
,e.g.
LANG=es_ES.UTF-8
man
List of language codes.