# Options and Flags: getopts and --help

getopts reads a script's one-letter options in any order, flags and options with a value alike, and a real tool also answers --help with a help page and --version with its version number.

![Cheat sheet for the lesson Options and Flags: getopts and --help: getopts reads a script's one-letter options in any order, flags and options with a value alike, and a real tool also answers --help with a help page and --version with its version number.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/8f622af05b0c4379b8cac2217b963806.webp)

- Category: Bash
- Level: Journeyman
- Tags: flags-and-options, getopts, here-document, linux, standard-streams, unix
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-options-with-getopts-cheat-sheet
