On 2024-10-18 22:08:09 -0400, Timothy M Butterworth wrote:
> I googled around and found:
>
> - tput bel: This command uses the tput utility to send the "bell"
> control character to the terminal.
> - echo -e "\a": The -e option enables interpretation of backslash
> escapes, and \a represents the bell character.
The -e option is not portable. For instance, with dash
(/bin/sh by default):
$ echo -e "\a"
-e
and \a is interpreted as bell anyway, but as said in the dash(1)
man page, this is undefined behavior; in short, don't do that!
> - printf "\a": The printf command works similarly to echo -e "\a".
AFAIK, this one is portable.
--
Vincent Lefèvre <vinc…@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)