I am running a while loop which ends in & and I closed the terminal, so I can't stop it now This is the code

while sleep 1; do say "1"; done &amp;


I closed the terminal, but now I can't stop my Mac saying "one" every second.
It is very annoying.
Open a new Terminal tab/window
Run ps alx|grep "[s]leep 1" (maybe several times, until you get the sleep 1 as part of the output

pse@Mithos:~$ ps alx|grep sleep 1
  502  1268  1245   0  20  0  2432796   1460 -      S      ??    0:00.00 sleep 31536000
  502 80121   809   0  31  0  2432796   1772 -      S+   s002    0:00.00 sleep 1

Kill the shell it's running in by using the parent PID of the sleep command (the number in the third column, 809 in this case): kill -HUP YOUR-PARENT-PID-HERE