read -p "続行しますか? (y/n): " ans

if [[ "$ans" != "y" && "$ans" != "Y" ]]; then
    echo "中止しました"
    exit 1
fi

echo "処理を続行します"

Yes以外の場合は即刻スクリプトを終了