I have a script running in the background and sends me an alert every few minutes. I want the alert to be in the form of a beep.
Question: How can I play a beep in mac terminal?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
printf \\a and
osascript -e beep play the default alert sound, but they are silent if the alert volume is set to zero.
printf \\a is also silent if an audible bell is disabled.
You could also use afplay or say:
afplay /System/Library/Sounds/Funk.aiff say done
There are more sound effect files in /System/Library/PrivateFrameworks/ScreenReader.framework/Versions/A/Resources/Sounds/.