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
|
||||
|
||||
number=(9 + $RANDOM%15)
|
||||
number=$((9 + $RANDOM%15))
|
||||
repeats=0
|
||||
printf -v loverspaces '%*s' "$((70-${#lover}))"
|
||||
|
||||
|
|
@ -30,7 +30,9 @@ do
|
|||
cat 2.txt
|
||||
elif [[ $repeats == 3 ]]; then
|
||||
cat 3.txt
|
||||
elif [[ $repeats < $number ]]; then
|
||||
elif [[ $repeats == $number ]]; then
|
||||
cat 4.txt
|
||||
else
|
||||
cat 4.txt
|
||||
sleep 0.45
|
||||
clear
|
||||
|
|
@ -49,8 +51,6 @@ do
|
|||
echo "QQQQQQQQQQQQQQQQ QQQQQQQQQQQQQQQ"
|
||||
echo "QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ"
|
||||
cat 3.txt
|
||||
elif [[ $repeats == $number ]]; then
|
||||
cat 4.txt
|
||||
fi
|
||||
read
|
||||
repeats=$((repeats+=1))
|
||||
|
|
|
|||
Loading…
Reference in a new issue