#!/bin/bash
# (C) David Vajda
# 2025-09-13
# wahrscheinlichkeitsrechnungsuebung
T=(A B C D)
i=0
while [ $i -lt 4 ]
do
echo -n "${T[$i]}"
i=$(($i+1))
done
i=0
while [ $i -lt 128 ]
do
echo -n $(($RANDOM%2))
if [ $(($i % 4)) -eq 0 ]
then
echo ""
fi
i=$(($i+1))
done
E=(A B C D)
echo "man sage ueber die ziffern, welche in welches Ereignis passt"
i=0
j=0
while [ $i -lt $((5*4)) ]
do
echo -n
if [ $(($i % 4)) -eq 0 ]
then
echo ""
echo -n "Ereignis ${E[$j]} = {"
j=$(($j+1))
fi
if [ $(($RANDOM%2)) -eq 0 ]
then
echo -n "${T[$(($i%4))]}"
fi
i=$(($i+1))
done
echo ""