console beep V0.2 by Josef Pavlik <jet@pavlik.it>

Usage: beep { freq | 0 } length [destination]
    or beep @ [<file>] [destination]

if freg==0 then delay 
freq is in Hz, length is in ms

file format: (see ring)

freq duration
freq duration
freq duration  # comment
# comment
etc.
you may specify the frequency using symbolic notes
a b c d e f g, a0, a1, a9, a#, a2#, bb, b3b etc.
a4 is 440 Hz


If first line of file is 
#!/bin/beep @ /dev/console         # for remote ring
or
#!/bin/beep @                      # for local ring
and file has attribute x, you may run it immediately

if the file name is ommited ( beep @ ), beep reads stdin

if you want beep on local system, use stdout as destination.
If you want beep on remote system, use remote /dev/console as destination. In this case beep (on remote system) must have setuid root.


Examples:
beep 1000 500     - sound 1kHz for 0.5s
beep @ ring       - telephone ring
beep 0 750        - 750ms delay
./ring            - telephone ring 
                  - 1st line of ring is #!/bin/beep @ /dev/console
