toolkit/func/core/pkg_coreutils/24-yes.sh

12 lines
287 B
Bash
Raw Normal View History

2021-07-05 06:50:25 +00:00
#!/bin/bash
r_log "coreutils" "Test the yes command"
touch /var/tmp/yes-123
touch /var/tmp/yes-345
2021-07-06 20:16:01 +00:00
# shellcheck disable=SC2216
2021-07-05 06:50:25 +00:00
yes | /bin/rm -i /var/tmp/yes-* || r_checkExitStatus 1
deleted=1
test -f /var/tmp/yes-123 || test -f /var/tmp/yes-345 || deleted=0
r_checkExitStatus $deleted