getopts
all
Parse shell options from arguments. Note: This command does not support longform options and thus using `getopt` is recommended instead.
More info →Examples (6)
Check if an option is set in a string (specified option must be the first element of the string)
Check for multiple options
Set `getopts` to silent mode and handle option errors
Reset `getopts`
OPTIND=1made by @shridhargupta | data from tldr-pages