logo

utils-std

Collection of commonly available Unix tools
commit: 0b3cd0b01f15c29a61c4d34e39090c177b007b08
parent 1d515d9d9f3c9f0bdcba4d93320ce1954e445e7f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 13 Apr 2024 06:19:43 +0200

cmd/yes: use : (colon) for while loop

: is a special builtin utility while true isn't defined as such.

Diffstat:

Mcmd/yes2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/yes b/cmd/yes @@ -8,6 +8,6 @@ die() { exit 1 } -while true; do +while :; do echo "${@:-y}" || die "Write error" done