fix randomness
This commit is contained in:
parent
edf3f9a708
commit
31eceb827a
8
daisy.sh
8
daisy.sh
|
|
@ -1,6 +1,6 @@
|
||||||
read -p "Enter the lovers name: " lover
|
read -p "Enter the lovers name: " lover
|
||||||
|
|
||||||
number=(9 + $RANDOM%15)
|
number=$((9 + $RANDOM%15))
|
||||||
repeats=0
|
repeats=0
|
||||||
printf -v loverspaces '%*s' "$((70-${#lover}))"
|
printf -v loverspaces '%*s' "$((70-${#lover}))"
|
||||||
|
|
||||||
|
|
@ -30,7 +30,9 @@ do
|
||||||
cat 2.txt
|
cat 2.txt
|
||||||
elif [[ $repeats == 3 ]]; then
|
elif [[ $repeats == 3 ]]; then
|
||||||
cat 3.txt
|
cat 3.txt
|
||||||
elif [[ $repeats < $number ]]; then
|
elif [[ $repeats == $number ]]; then
|
||||||
|
cat 4.txt
|
||||||
|
else
|
||||||
cat 4.txt
|
cat 4.txt
|
||||||
sleep 0.45
|
sleep 0.45
|
||||||
clear
|
clear
|
||||||
|
|
@ -49,8 +51,6 @@ do
|
||||||
echo "QQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQ"
|
echo "QQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQ"
|
||||||
echo "QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ"
|
echo "QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ"
|
||||||
cat 3.txt
|
cat 3.txt
|
||||||
elif [[ $repeats == $number ]]; then
|
|
||||||
cat 4.txt
|
|
||||||
fi
|
fi
|
||||||
read
|
read
|
||||||
repeats=$((repeats+=1))
|
repeats=$((repeats+=1))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue