Created
August 19, 2020 02:24
-
-
Save mdtareque/2c43a129f13f7cfe090abc0e3475f348 to your computer and use it in GitHub Desktop.
mac verbal feedback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://askubuntu.com/questions/873719/how-to-set-a-variable-to-a-random-value-with-bash | |
#https://stackoverflow.com/questions/16553089/dynamic-variable-names-in-bash | |
#http://mywiki.wooledge.org/BashFAQ/006#Indirection | |
#declare "magic_variable_$1=v$(( $RANDOM % 1000 ))" ; var="magic_variable_$1"; echo "${!var}" | |
#read ${!var} | |
#echo $v396 | |
function verbal_feedback () | |
{ | |
echo "enter any character and press enter, to stop verbal feedback."; | |
while [ 1 == 1 ]; do | |
declare "magic_variable=v$(( $RANDOM % 1000 ))" ; var="magic_variable"; dvar=${!var}; echo "${!var}" | |
read -t 2 $dvar | |
if [ ! -z "${!dvar}" ]; then | |
echo "$dvar is ${!dvar}"; | |
break; | |
else | |
say -v Daniel "build completed"; | |
sleep 1; | |
fi; | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment