yes (283B)
- #!/bin/sh
- # utils-std: Collection of commonly available Unix tools
- # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- # SPDX-License-Identifier: MPL-2.0
- die() {
- echo "yes: $@" >&2
- exit 1
- }
- while :; do
- echo "${@:-y}" || die "Write error"
- done