Skip to content

Instantly share code, notes, and snippets.

@mkhl
Created February 22, 2011 22:52
Show Gist options
  • Save mkhl/839609 to your computer and use it in GitHub Desktop.
Save mkhl/839609 to your computer and use it in GitHub Desktop.
Simple usage information for shell scripts
#!/bin/sh
# Usage documentation and program description go here,
# nicely formatted and laid out to fit 78 columns.
# NOTE: The blank line above is the end of the file comment header.
# Check command-line options
if true; then
# Display the file comment header.
sed -n '2,/^$/s/^# //p' "$0"
exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment