2

i am developing some software with a significant build time, so i want to execute the build command and play a noise once it is finished. two questions:

  1. how do i make some noise from the command line (Redhat Enterprise Linux 5)?
  2. i am doing the build on a remote machine, so is there something like X11 forwarding for sound that will play the noise on my machine?

if #2 isn't possible/easy i guess i could just execute the build command on the remote machine and play the noise locally. thanks for the help.

6

You can echo the BEL character, perhaps multiple times, from your build script.

For example:

#!/bin/sh
echo "\a\a\a"

The above example will print the BEL character 3 times. Thus, the PC speaker should emit 3 beeps.

  • 2
    Note that if you're using Bash instead of sh you'll need echo -en "\a\a\a" (the -n` suppresses the newline). Also, in either case I only get one "ding". You can loop with a short sleep to make it work. – Paused until further notice. Jan 15 '10 at 16:58
0

What about printing the BEL character (0x07)? It should make a ping!/beep! on the terminal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.