I'm trying to create an insult generator for one of my classes and I'm not quite sure how to finish it.
I have the whole thing doing what I want, but I need to convert the external commands I'm using in the script to bash equivalents.
The file I'm reading from has 3 columns of words that together make up a Shakespearean insult.
The code:
while read ; do
Insult=$(shuf -n 1 | tr "\t" " ")
echo "thou $Insult"
done < /class/SIG_data
The tr
command is in there for readability, as the columns are separated with tabs. I just need to know how to do this without using tr
and shuf
.