toolkit/func/core/pkg_coreutils/22-uniq.sh

18 lines
288 B
Bash
Raw Normal View History

2021-07-05 06:50:25 +00:00
#!/bin/bash
r_log "coreutils" "Ensure uniq works as expected"
2023-11-21 08:23:44 +00:00
trap '/bin/rm /var/tmp/uniq' EXIT
2021-07-05 06:50:25 +00:00
cat > /var/tmp/uniq <<EOF
Rocky
Rocky
Obsidian
obsidian
Green
Green
Blue
onyn
EOF
uniq -d /var/tmp/uniq | wc -l | grep -q 2 && uniq -u /var/tmp/uniq | wc -l | grep -q 4
r_checkExitStatus $?