16 lines
294 B
Bash
16 lines
294 B
Bash
#!/bin/sh
|
|
|
|
# seeding rng
|
|
RANDOM="2$(hostname | sum | cut -f 1 -d ' ')"
|
|
|
|
|
|
# rng function
|
|
function random_from {
|
|
declare -a array=("$@")
|
|
r=$((RANDOM % ${#array[@]}))
|
|
printf "%s\n" "${array[$r]}"
|
|
}
|
|
|
|
|
|
# generated variables
|
|
export MACHINE_COLOR=$(random_from 1 2 3 4 5 6 7 8 9 10 11 12 13 14)
|