Skip to content

Instantly share code, notes, and snippets.

@w33tmaricich
Created June 5, 2018 19:15
Show Gist options
  • Save w33tmaricich/970d9819894698b319f246cd9573384b to your computer and use it in GitHub Desktop.
Save w33tmaricich/970d9819894698b319f246cd9573384b to your computer and use it in GitHub Desktop.
sh: usage example
programname=$0
function usage {
echo "usage: $programname [-abch] [-f infile] [-o outfile]"
echo " -a turn on feature a"
echo " -b turn on feature b"
echo " -c turn on feature c"
echo " -h display help"
echo " -f infile specify input file infile"
echo " -o outfile specify output file outfile"
exit 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment