confirm() read -rp "$1 [y/N]: " ans [[ "$ans" =~ ^[Yy]$ ]]