1

This question is similar, but different of
How can I get an audio notification when a shell command have finished?
I am looking for a command that can be used like

sleep 2 &; sleep 1 &; sleep 5 &; sleep 3; bell

giving an audible notification after 5 seconds.

I use zsh in a KDE konsole.

Volker Siegel
  • 17,283

2 Answers2

0

How about

sleep 2 &; sleep 1 &; sleep 5 &; sleep 3 &; for job in `jobs -p` ; do wait $job ; done ; bell

(simplified from https://stackoverflow.com/questions/356100/how-to-wait-in-bash-for-several-subprocesses-to-finish-and-return-exit-code-0)?

Side note: I tested in GNU bash, Version 4.3.48 instead of zsh and used beep instead of bell. My actual command was slightly different:

sleep 2 & sleep 1 & sleep 5 & sleep 3 & for job in `jobs -p` ; do wait $job ; done ; beep
Hermann
  • 6,148
-1

You can use sleep 2 & sleep 1 & sleep 5 & wait; xkbbell -force. You may need to run modprobe pcspkr as root.

argle
  • 523