manページの作り方

マニュアルはUbuntuだと $ man ${command} で表示される。
上部にdescriptionがあり、オプションの説明、その後はauthor, bug, report, copyrightなどだ。

以下はcatの例
CAT(1) User Commands CAT(1)

NAME
cat – concatenate files and print on the standard output

SYNOPSIS
cat [OPTION]… [FILE]…

DESCRIPTION
Concatenate FILE(s) to standard output.

With no FILE, or when FILE is -, read standard input.

-A, –show-all
EXAMPLES
cat f – g
Output f’s contents, then standard input, then g’s contents.

cat Copy standard input to standard output.

AUTHOR
Written by Torbjorn Granlund and Richard M. Stallman.

REPORTING BUGS
GNU coreutils online help:
Report any translation bugs to
COPYRIGHT
Copyright © 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL
version 3 or later .
This is free software: you are free to change and redistribute it. There is
NO WARRANTY, to the extent permitted by law.

SEE ALSO
tac(1)

Full documentation
or available locally via: info ‘(coreutils) cat invocation’

GNU coreutils 8.32 February 2022 CAT(1)

シェルで受けっとって表示か?