How to make the hardware beep sound in Mac OS X 10.6

elhombre picture elhombre · Jun 27, 2010 · Viewed 88.8k times · Source

I just want that Mac OS X 10.6 does a hardware beep sound like in open suse and other distributions. I tried following approaches

Terminal -> beep = -bash: beep: command not found

Terminal -> say beep = voice speaks out beep (Not a Hardware beep but awesome ;) )

applescript -> beep = Macintosh bell (I want a Hardware beep!)

Does anybody know how to make the Hardware beep in bin/bash or applescript?

Answer

broofa picture broofa · Jun 6, 2011

tput bel works in most shells.

In OS X, this (and any other command that makes the bell go off) also gets you a badge if the command is executed when Terminal was not in the foreground: