[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
Top Document: Unix - Frequently Asked Questions (2/7) [Frequent posting]
Previous Document: What's wrong with having '.' in your $PATH ?
Next Document: Why can't I use "talk" to talk with my friend on machine X?
-
Search the FAQ Archives
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
Top Document: Unix - Frequently Asked Questions (2/7) [Frequent posting]
Previous Document: What's wrong with having '.' in your $PATH ?
Next Document: Why can't I use "talk" to talk with my friend on machine X?
How do I ring the terminal bell during a shell script?
Date: Fri, 30 Apr 93 16:33:00 +0200
2.14) How do I ring the terminal bell during a shell script?
The answer depends on your Unix version (or rather on the kind of
"echo" program that is available on your machine).
A BSD-like "echo" uses the "-n" option for suppressing the final
newline and does not understand the octal \nnn notation. Thus
the command is
echo -n '^G'
where ^G means a _literal_ BEL-character (you can produce this in
emacs using "Ctrl-Q Ctrl-G" and in vi using "Ctrl-V Ctrl-G").
A SysV-like "echo" understands the \nnn notation and uses \c to
suppress the final newline, so the answer is:
echo '\007\c'
Top Document: Unix - Frequently Asked Questions (2/7) [Frequent posting]
Previous Document: What's wrong with having '.' in your $PATH ?
Next Document: Why can't I use "talk" to talk with my friend on machine X?
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Send corrections/additions to the FAQ Maintainer:
tmatimar@isgtec.com (Ted Timar)
Last Update October 22 2009 @ 05:35 AM