% CONFIRM(1) Version 3.2.1 | Scripts Documentation % Georg Voell - georg.voell@standby.cloud % (c)2024 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" -a, \--abort _string_         : _string_: Allowed "Abortion" answers e.g. "q/quit" Question ------- _string_          : Display _string_ and wait for confirmation. EXAMPLES ======== **confirm** "Do you want to continue?" : Result: "Do you want to continue? (y/yes n/no) [no]:" **confirm** "Install the scripts?" -y "y/[yes]" : Result: "Install the scripts? (y/yes n/no) [yes]:" **confirm** "Sind Sie sicher?" \--yes "j/[ja]" --no "n/nein" : Result: "Sind Sie sicher? (j/ja n/nein) [ja]:" **confirm** "¿Hablas español?" \--yes "s/si" --no "n/[no]" : Result: "¿Hablas español? (s/si n/no) [no]:" **confirm** "Do you want to continue?" \--abort "q/quit" : Result: "Do you want to continue? (y/yes n/no q/quit) [quit]:" EXIT CODES ========== 00: Confirmed / Ok 01: Unknown or wrong parameter or abort. 02: No confirmation. 99: User interrupt. SEE ALSO ======== **install-scripts**(1)