Topic

error-handling

7 articles

Bash

yesno() in Bash: Ask a Yes/No Question Safely

A yes/no confirmation prompt for Bash scripts that accepts any case, has an optional default and handles cron, pipes and EOF without looping forever.

6 min read, updated 17 Oct 2026