vern-scripts/tilserv/countvotes

9 lines
172 B
Bash
Executable File

#!/usr/bin/env -S bash
if [ $# -eq 0 ]; then
printf 'Usage: %s text\n' "$0"
exit 1
fi
for i in /vm/*; do head -n 1 "$i"/.vote 2>/dev/null; done | grep -ci "^\s*$*\s*$"