This command will randomly select a number between 1 and 10000, then print out that number of lines of the word "yes" with underscores between each word and no new lines.
shuf -i 1-10000 -n 1 | xargs -I {} yes | head -n {} | tr -s _ | tr -d "\\n"