3.44. getopt (parse option arguments)

3.44.1. Usage

getopt OPTSTRING VAR

3.44.2. Synopsis

OPTSTRING contains the option letters. Add a colon to an options if this option has a required argument or two colons for an optional argument. The current option is saved in VAR, arguments are saved in $OPTARG. Any non-option arguments can be accessed starting from $1.

Table Of Contents

Previous topic

3.43. filetype (detect file type)

Next topic

3.45. global (create or set global variables)

This Page