# functions and variables for use in multiple files ("common" functions and variables) question_answered_with_yes() { local prompt="$1" local ans printf '%b\n Geben Sie j oder n ein und die Eingabetaste,\n Abbruch mit jeder anderen Taste ... [j/N]: ' "$prompt" read -r ans case "$ans" in j | J | ja | y | Y) return 0 ;; n | N | "") return 1 ;; *) echo "Abbruch." exit 1 ;; esac }