#!/bin/bash TXT='Voy a escribir un texto mucho más largo para que tenga mucho más que coger. The quick brown fox jumped over the lazy dog.' WORDS=( $TXT ) for WORD in "${WORDS[@]}"; do let "i=$RANDOM % 256" echo -en "\e[38;5;${i}m$WORD \e[0m"; done; echo