There is a bash script. The function is called from the script, from which the second is called:
until [["$ answ" == "y" || "$ answ" == "n"]]
do
echo "Please press y or n"
read -r answ
done
for some reason nothing is recorded in the variable answ
+ [['' == \ y]]
+ [['' == \ n]]
+ echo 'Please press y or n'
Please press y or n
+ read -r answ
+ [['' == \ y]]
+ [['' == \ n]]
+ echo 'Please press y or n'
Please press y or n
+ read -r answ
+ [['' == \ y]]
+ [['' == \ n]]
...
At runtime read, the following loop steps are executed, even if you add wait
Post has been editedPHPoeniX - 15.07.19, 13:07