Created
March 24, 2013 21:12
-
-
Save nicerobot/5233543 to your computer and use it in GitHub Desktop.
How to incorporate usage into sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
grep "^## " "$0" | cut -c 4- | groff -Tascii -man | more | |
## .TH USAGE 1 "March 24 2013" "Version 1.0" "USER COMMANDS" | |
## .\" strings | |
## .ds ex \fIexpr\fR | |
## .SH NAME | |
## usage \- example of incorporating usage | |
## .SH SYNOPSIS | |
## .B usage | |
## .PP | |
## .SH DESCRIPTION | |
## .B usage | |
## is an example of sh usage as man format. | |
## .PP | |
## .SH OPTIONS | |
## .B usage | |
## .PP | |
## .SH BUGS | |
## .B usage | |
## .PP | |
## .SH AUTHOR | |
## nicerobot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment