License Public Domain
Lines 1
Average
n/a
Rated
0
Times
5
4
3
2
1
0
Keywords
system bell (1)
Permissions
Owner: David
Viewable by Everyone
Editable by All Siafoo Users
Hide
Need a quick chart or graph for your blog? Try our reStructured Text renderer. Join Siafoo Now or Learn More

Ring the Bell Atom Feed

In Brief How to ring the bell from the terminal.... more
# 's
1echo $'\a'

How to ring the bell from the terminal.

Printing "\a" from bash, Python, and most other languages will ring the bell. It's almost trivial, but a good (if annoying) way to communicate with the user.

For example, when developing Siafoo we run unittests occasionally, these could take a while or crash right away, and I don't want to sit and stare at them:

# 's
1nosetests -x [some other options]; echo $'\a'

Now I can tell audibly when the tests are done.... granted I can also tell when my laptop stops sounding like a jet engine, but that's a bit more delayed...