rwxrob-dot/scripts/confirm

11 lines
130 B
Plaintext
Raw Normal View History

2022-02-09 07:29:05 +00:00
#!/usr/bin/env bash
confirm () {
declare yn
read -p " [y/N] " yn
[[ ${yn,,} =~ y(es)? ]] && return 0
return 1
}
confirm