zeek on Wed, 11 Jun 2003 09:05:15 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: [PLUG] System Bell - Beep!



Thanks for the tip Jeff. I've tried this on 3 different systems, including one
which beeps with an init script --but it's not working anywhere.



Cheers,
-zeek

Sparklehouse Media and Technologies
http://sparklehouse.com



> -----Original Message-----
> From: plug-admin@lists.phillylinux.org
> [mailto:plug-admin@lists.phillylinux.org]On Behalf Of Jeff Abrahamson
> Sent: Tuesday, June 10, 2003 11:58 PM
> To: Plug
> Subject: Re: [PLUG] System Bell - Beep!
>
>
> On Tue, Jun 10, 2003 at 10:10:01PM -0400, zeek wrote:
> >   [26 lines, 73 words, 659 characters]  Top characters: _entsil\n
> >
> >
> > Greets PLUGgers,
> >
> > Does anyone know how to ring a system bell, a beep w/o additional
> software? I've
> > tried:
> >
> > echo -n -e "\a"  and  echo -n -e "\007"
> >
> > but neither of these are working --even for systems which ring
> bells on other
> > calls.
> >
> >
> > I want to work this into a BB monitoring alert.
>
> These both work for me:
>
>     /bin/echo -n -e "\a"
>     echo -n -e "\a"
>
> Since echo is also a shell built-in, you have to specify that you want
> /bin/echo if you want it.
>
> You can also fiddle with the shell built-in. From the bash man page:
>
>  echo [-neE] [arg ...]
> 	Output the args, separated by spaces, followed by a newline.  The return
> 	status  is  always  0.  If -n is specified, the trailing newline is sup-
> 	pressed.  If the -e option is given,  interpretation  of  the  following
> 	backslash-escaped  characters  is  enabled.   The -E option disables the
> 	interpretation of these escape characters, even on  systems  where  they
> 	are  interpreted  by  default.  The xpg_echo shell option may be used to
> 	dynamically determine whether or not echo expands these  escape  charac-
> 	ters by default.  echo does not interpret -- to mean the end of options.
> 	echo interprets the following escape sequences:
> 	\a     alert (bell)
> 	\b     backspace
> 	\c     suppress trailing newline
> 	\e     an escape character
> 	\f     form feed
> 	\n     new line
> 	\r     carriage return
> 	\t     horizontal tab
> 	\v     vertical tab
> 	\\     backslash
> 	\0nnn  the eight-bit character whose value is the octal value nnn  (zero
> 	       to three octal digits)
> 	\nnn   the  eight-bit  character whose value is the octal value nnn (one
> 	       to three octal digits)
> 	\xHH   the eight-bit character whose value is the hexadecimal  value  HH
> 	       (one or two hex digits)
>
> --
>  Jeff
>
>  Jeff Abrahamson  <http://www.purple.com/jeff/>
>  GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B
>


_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug