Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

Unix - Frequently Asked Questions (2/7) [Frequent posting]
Section - How do I ring the terminal bell during a shell script?

( Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Houses ]


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?
See reader questions & answers on this topic! - Help others by sharing your knowledge
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'

User Contributions:

Comment about this article, ask questions, or add new information about this topic:

CAPTCHA




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 March 27 2014 @ 02:12 PM