Skip to content

Instantly share code, notes, and snippets.

@lauriro
Last active September 11, 2021 16:05
Show Gist options
  • Save lauriro/1818cef46bd03fb11739f78d05c7f82e to your computer and use it in GitHub Desktop.
Save lauriro/1818cef46bd03fb11739f78d05c7f82e to your computer and use it in GitHub Desktop.
#!/bin/sh
# Usage info
show_help1() {
cat << EOF
Usage: ${0##*/} [-hv] [-f OUTFILE] [FILE]...
Do stuff with FILE and write the result to standard output. With no FILE
or when FILE is -, read standard input.
-h display this help and exit
-f OUTFILE write the result to OUTFILE instead of standard output.
-v verbose mode. Can be used multiple times for increased
verbosity.
EOF
}
# Usage info
show_help2() {
cat <<- EOF
Usage: ${0##*/} [-hv] [-f OUTFILE] [FILE]...
Do stuff with FILE and write the result to standard output. With no FILE
or when FILE is -, read standard input.
-h display this help and exit
-f OUTFILE write the result to OUTFILE instead of standard output.
-v verbose mode. Can be used multiple times for increased
verbosity.
EOF
}
show_help1
show_help2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment