Skip to content

Instantly share code, notes, and snippets.

@eddieantonio
Last active January 30, 2023 12:41
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save eddieantonio/55752dd76a003fefb562 to your computer and use it in GitHub Desktop.
Save eddieantonio/55752dd76a003fefb562 to your computer and use it in GitHub Desktop.
man page template in Markdown

% HELLO(1) Version 1.0 | Frivolous "Hello World" Documentation

NAME

hello — prints Hello, World!

SYNOPSIS

| hello [-o|--out file] [dedication] | hello [-h|--help|-v|--version]

DESCRIPTION

Prints "Hello, dedication!" to the terminal. If no dedication is given, uses the default dedication. The default dedication is chosen by the following sequence:

  1. Using the environment variable DEFAULT_HELLO_DEDICATION
  2. Using the per-user configuration file, ~/.hellorc
  3. Using the system-wide configuration file, /etc/hello.conf
  4. Finally, using "world".

Options

-h, --help

: Prints brief usage information.

-o, --output

: Outputs the greeting to the given filename.

The file must be an **open(2)**able and **write(2)**able file.

-v, --version

: Prints the current version number.

FILES

~/.hellorc

: Per-user default dedication file.

/etc/hello.conf

: Global default dedication file.

ENVIRONMENT

DEFAULT_HELLO_DEDICATION

: The default dedication if none is given. Has the highest precedence if a dedication is not supplied on the command line.

BUGS

See GitHub Issues: https://github.com/[owner]/[repo]/issues

AUTHOR

Foobar Goodprogrammer foo@example.org

SEE ALSO

hi(1), hello(3), hello.conf(5)

Licensed under the terms of CC0.

To the extent possible under law, Eddie Antonio Santos has waived all copyright and related or neighboring rights to this work. This work is published from: Canada.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment