 <p>I would not have them answer "Yes" then type in the new value. Just have them type in the new value if they want one, or leave it blank to accept the default.</p> <p>This little function lets you set multiple variables in one call:</p> <pre><code>function confirm() { echo "Confirming values for several variables." for var; do read -p "$var = ${!var} ... leave blank to accept or enter a new value: " case $REPLY in "") # empty use default ;; *) # not empty, set the variable using printf -v printf -v "$var" "$REPLY" ;; esac done } </code></pre> <p>Used like so:</p> <pre><code>$ foo='foo_default_value' $ bar='default_for_bar' $ confirm foo bar Confirming values for several variables. foo = foo_default_value ... leave blank to accept or enter a new value: bar bar = default_for_bar ... leave blank to accept or enter a new value: foo=[bar], bar=[default_for_bar] </code></pre> <p>Of course, if blank can be a default, then you would need to account for that, like @jm666 use of <code>read -i</code>.</p>