Skip to content

Latest commit

 

History

History
47 lines (27 loc) · 802 Bytes

README.md

File metadata and controls

47 lines (27 loc) · 802 Bytes

getopt(1)

NAME

getopt - example of how to use getopt_long function

SYNOPSIS

getopt [OPTIONS] ARG

DESCRIPTION

getopt(1) is a good template to begin with a new CLI in C, based on a basic skeleton using getopt_long(3) to parse arguments.

OPTIONS

-s or --string STRING Set string.

-n or --number NUMBER Set number.

-h or --help Display this message.

-V or --version Display the version.

EXIT STATUS

Exits success if command-line is valid; exits failure otherwise.

EXAMPLES

See getopt.c.

AUTHOR

Written by Gaël PORTAY gael.portay@gmail.com

COPYRIGHT

Copyright (c) 2015-2017 Gaël PORTAY

This program is free software: you can redistribute it and/or modify it under the terms of the MIT License.