Dec 24, 2009
Notes
Notes
printf "\7"
The ASCII code for a system beep is 7.
printf "\7" is a quick way to give you some aural feedback in your shell scripts (“your files are copied!”), C programs (“this part of the if statement is being run!”), or any program that treats text as ASCII.
Alternatively: echo '^G'
(don’t forget, to get that ^G, type Ctrl+V and then Ctrl+G)
About
The writings and other things of Scott Jackson, an amateur at everything.
Subscribe via RSS.