Bash: Dice (1-6 random numbers)
From WikiMLT
Here is a CLI sample for dice simulation and partial analyze.
for i in {1..600}; do shuf -i 1-6 -n 1; done | sort | uniq -c | sort -nr
117 5
111 2
103 3
91 6
89 4
89 1
References:
- Random number from a range in a Bash Script
- Getting the count of unique values in a column in bash