Bash generate email
apt install mailutils
random-string()
{
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-32000} | head -n 1
}
random-string2()
{
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-32} | head -n 1
}
for ii in `seq 1 250`;
do
num=$((200 + RANDOM % 100));
echo $num;
for i in `seq 1 $num; `;
do
a=$(random-string);
echo $a > test
mail -s $(random-string2) test@lab2.tuke.sk < test
done
sleep $[ ( $RANDOM % 5 ) + 10 ]s
echo "iteracia" $ii;
done