Shuffle | Cheatsheet
The shuf command in Linux writes a random permutation of the input lines to standard output. It pseudo randomizes an input in the same way as the cards are shuffled. It is a part of GNU Coreutils and is not a part of POSIX
Shuffle a sentence
Shuffle one letter
Shuffle two letters
letters=("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z")
while true; do
shuffled_letter1=$(printf "%s\n" "${letters[@]}" | shuf -n 1)
shuffled_letter2=$(printf "%s\n" "${letters[@]}" | shuf -n 1)
printf "%s%s\r" "$shuffled_letter1" "$shuffled_letter2"
sleep 0.1
done