0
(0)

they have gone missing.

but they are available again under Debian 11 https://packages.debian.org/bullseye/gcc-doc

hostnamectl; # tested on
  Operating System: Debian GNU/Linux 11 (bullseye)
            Kernel: Linux 5.10.0-9-amd64
      Architecture: x86-64

apt search gcc-doc
Sorting... Done
Full Text Search... Done
gcc-doc/stable,stable 5:10.1.0-1 amd64
  documentation for the GNU compilers (gcc, gobjc, g++)

gcc-doc-base/stable,stable 10.1.0-1 all
  several GNU manual pages

how to create a man page?

hostnamectl; # tested on
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-18-amd64
      Architecture: x86-64

# install requirements
su - root
apt update
apt install pandoc

# creat a new file with user's fav text editor

vim toolx.man.md
% TOOLX(1) toolx v1.0.3
% username
% 2022-02-22

# NAME
toolx - a nice tool

# SYNOPSIS
**toolx** [*OPTION*]\
**toolx** *PATTERN*

# DESCRIPTION
**toolx** does nice stuff

# OPTIONS
**--version**, **-v**
: shows tool's version

**--h**, **--help**
: show quick help

# EXAMPLES
**toolx -v**
: shows tool's version

**toolx -h**
: show quick help

# EXIT VALUES

**0**
: success

**1**
: invalid option

# BUGS
list of known problems

# COPYRIGHT

       Copyright © 2018 Free Software Foundation, Inc.   License  GPLv3+:  GNU
       GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
       This  is  free  software:  you  are free to change and redistribute it.
       There is NO WARRANTY, to the extent permitted by law.

# SEE ALSO
       Full documentation at: <https://www.gnu.org/software/coreutils/ls>
       or available locally via: info '(coreutils) ls invocation'


# hit ESC
# then enter w (save) q (quit) in vim
:wq

# "compile" man page markup.md into manpage markup
pandoc toolx.man.md -s -t man -o toolx.man.md.1

# checkout what manpage markup looks like
vim toolx.man.md.1


# compress
gzip toolx.man.md.1

manpath
/usr/local/man:/usr/local/share/man:/usr/share/man

ll /usr/local/man
lrwxrwxrwx 1 root root 9 2020-02-04 /usr/local/man -> share/man

# structure of
ll /usr/share/man

# install the manpage
su - root
mv -v toolx.man.md.1.gz /usr/share/man/man1/

# update the mandb
mandb

# checkout the newly added manpage :)
man toolx

how to save export manpage to text file?

man toolx > toolx.man.txt

so it can be attached toolx.man.txt to a blog entry…

together with manpages of the tools creating it

manpages

pandoc.man.txt

mandb.man.txt

manpath.man.txt

crazy ideas: ansible.md is using markdown

can pandoc somehow, transform the ungly ansible.md in beautiful readable html? (with clickable links, or something else nicely readable? would be nice)

Links:

creditz: https://www.howtogeek.com/682871/how-to-create-a-man-page-on-linux/

average rating 0 / 5. based on ratings 0

not rated yet

admin