Skip to content

Instantly share code, notes, and snippets.

@pgib
Last active August 29, 2015 13:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgib/9941862 to your computer and use it in GitHub Desktop.
Save pgib/9941862 to your computer and use it in GitHub Desktop.
Simple Unix program to output a terminal bell (beep)

Compile with:

gcc beep.c -o beep

Or on platforms that no longer have gcc by default (e.g. FreeBSD 10):

cc beep.c -o beep

Made for tmux/screen to get your attention in a background window.

#include <stdio.h>
int main()
{
printf("\a");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment