Currently I am using a following command: while true; do python [file]; sleep X; done
I was wondering if I can stop the loop if the result prints a word that I'm looking for.
Plus is it possible to make a sound when it stops?
macpythonterminal
Currently I am using a following command: while true; do python [file]; sleep X; done
I was wondering if I can stop the loop if the result prints a word that I'm looking for.
Plus is it possible to make a sound when it stops?
Best Answer
You can stop the execution by entering the command
break
.To make a sound,
tput bel
should work on most shells.Something like the following example should work: