Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 684 Bytes

README.md

File metadata and controls

39 lines (25 loc) · 684 Bytes

MANPAGES

Demonstrate how to create a manpage.

Prequisites

Install vscode extension for manpage troff syntax highlighting

code --install-extension ban.troff

Example

Open the page in man pages.

man ./example-script.troff  

Install the man page

# create manpage folder
sudo mkdir -p /usr/local/man/man1  

# use 'install' to copy manpage     
install -g 0 -o 0 -m 0644 ./example-script.troff /usr/local/man/man1/example-script.1

# gzip it
gzip /usr/local/man/man1/example-script.1

# print manpage for your script
man example-script

Resources

  • The GNU Troff Manual here