[TriLUG] Dumb Question: Terminal Beep Command

Aaron S. Joyner aaron at joyner.ws
Tue Feb 15 16:33:46 EST 2005


Brian Henning wrote:

> Hi Guys,
>   Back in the days of DOS, there was a really cool shell command, 
> "BEEP."  Amazingly, execution of said command caused a terminal beep.  
> I am looking for exactly that function in a bash shell, but for some 
> reason it is eluding me.
>
> Ooh, here we go:  From the bash manpage: $'\a' results in an alert, or 
> bell.  So my question becomes, is there a preexisting shell command 
> that will accomplish "echo $'\a'" in less than half the number of 
> keystrokes, and doesn't result in a line-feed in the terminal?
>
> Thanks!
> ~Brian

The path to the beep command of old, is through the magic one-liners of 
the future.

echo -e '#!/bin/bash\necho -n $a' > /usr/local/bin/beep && chmod +x 
/usr/local/bin/beep

Aaron S. Joyner



More information about the TriLUG mailing list