Hacker News new | ask | show | jobs
by orpheansodality 892 days ago
I've appended `; tput bel` to the end of long-running scripts to get the same effect.

Fun fact: the `bell` control character is part of the ascii standard (and before that the baudot telegraph encoding!) and was originally there to ring a literal bell on a recipient's telegraph or teletype machine, presumably to get their attention that they had an incoming message.

To keep backwards compatibility today's terminal emulators trigger the system alert sound instead.

3 comments

In Java and JavaScript it’s just:

    \u0007
It’s handy to put in your shell code that takes a few seconds, or more, to complete.
The Apple II+ still had a ‘bell’ key on the keyboard (I can’t think of a more recent computer that had that)
I always used to just have 'echo "^G"' instead (where ^G is typed as CTRL-V CTRL-G).