A friend of mine is organizing a competition of sorts. He has asked to know if there is some software where one puts names of people who have answered correctly and then the software picks up a name and shares it as an answer. All names equally weighed and let the A.I. or whatever do its thing.
Asked
Active
Viewed 41 times
1 Answers
5
You can use shuf
:
$ cat /tmp/names
Bob
Nancy
Margaret
Sam
$ shuf -n1 /tmp/names
Margaret
The -n1
says "output 1 line".

Andy Dalton
- 13,993