#!/bin/bash -e echo while true; do read -p "Do you wish to include your system configuration with this report (hp-check -r)? " yn case $yn in [Yy]* ) /usr/bin/hp-check -t -r >&3 2>&3; break;; [Nn]* ) exit;; * ) echo "Please answer yes or no.";; esac done