How to make a man page for my shell script?
Sample man page, from the link:
.\" Manpage for nuseradd..\" Contact vivek@nixcraft.net.in to correct errors or typos..TH man 8 "06 May 2010" "1.0" "nuseradd man page".SH NAMEnuseradd \- create a new LDAP user.SH SYNOPSISnuseradd [USERNAME].SH DESCRIPTIONnuseradd is high level shell program for adding users to LDAP server. On Debian, administrators should usually use nuseradd.debian(8) instead..SH OPTIONSThe nuseradd does not take any options. However, you can supply username..SH SEE ALSOuseradd(8), passwd(5), nuseradd.debian(8).SH BUGSNo known bugs..SH AUTHORVivek Gite (vivek@nixcraft.net.in)
Installing with your script:
install -g 0 -o 0 -m 0644 nuseradd.1 /usr/local/man/man8/gzip /usr/local/man/man8/nuseradd.1
Installing it manually:
cp nuseradd /usr/local/man/man8/nuseradd.1gzip /usr/local/man/man8/nuseradd.1