% CONFIRM(1) Version 3.1.0 | Scripts Documentation % Georg Voell - georg.voell@standby.cloud % (c)2023 Standby.cloud NAME ==== **confirm** - (BASH Script) Display first parameter (question) and wait for an answer (yes to confirm). SYNOPSIS ======== | **confirm** \[_options_] _question_ DESCRIPTION =========== Display first parameter (question) and wait for an answer (yes to confirm). If answer is yes, returncode is 0 else returncode is > 0. A default answer can be specified marked within "[]" when return is pressed. Options ------- -h, \--help          : Displays helptext. -v, \--version          : Displays the version of the script. -y, \--yes _string_         : _string_: Allowed "Yes" answers e.g. "y/yes" -n, \--no _string_          : _string_: Allowed "No" answers e.g. "n/[no]" Question ------- _string_          : Display _string_ and wait for confirmation. EXAMPLES ======== **confirm** "Do you want to continue?" : Result: "Do you want to continue? (yes/y/quit) [quit]:" **confirm** "Install the scripts?" -y "[yes]/y" : Result: "Install the scripts? (yes/y/quit) [yes]:" **confirm** "Sind Sie sicher?" \--yes "[ja]/j" --no "nein/n" : Result: "Sind Sie sicher? (ja/j/nein/n) [ja]:" **confirm** "¿Hablas español?" \--yes "si/s" --no "[no]/n" : Result: "¿Hablas español? (si/s/no/n) [no]:" EXIT CODES ========== 01: Unknown or wrong parameter. 02: No question asked / No parameter given. 03: No confirmation. 99: User interrupt. SEE ALSO ======== **install-scripts**(1)