option string

The string given to getopts listing the option letters a script accepts, with a colon after each letter that takes a value.

In more detail

In ":vf:" the v is a flag and f needs a value. The leading colon turns on silent error mode: getopts then reports an unknown option as a question mark and a missing value as a colon, and leaves the messages to you.

Related terms

Taught in

References