I would like to realise the following in Linux-Almalinux: So i would like to add 5 records with a new random word in it.
Problem is that following code will add N records with the same word. How can i some how add or something or maybe some temp variabele where i can delete this after every while loop...
So when INPUT_NUMBER is 5 then it adds 5 records with 5 random different names
local word=$(sort -R names.list | head -1)
Local INPUT_NUMBER=${2}
while [[ 1 -le $INPUT_NUMBER ]]
do
create_record ${word} ${Domain}
((i = i + 1))
done
Thanks in advance!
I tried to think about a solution but since im more experienced with JAVA, these WHILE/IF is completely different in Linux and more complex.
Put N words in an array and loop over the array.