#!/bin/ksh #ident "@(#) 1.0 send ASCII bell character to standard out N times (default 3) 19960401 John S. Urban" #set -x export BELL BELL=`echo "%"|tr '%' '\007'` TIMES=${1:-'3'} SLEEP_TIME=${2:-'1'} while test $TIMES -gt 0 do echo $BELL #old sh way# TIMES=`expr $TIMES - 1` TIMES=$(( $TIMES - 1 )) sleep $SLEEP_TIME done exit Using tr(1) and an octal value is more portable than looking for an echo(1) or printf(1) that can print a bell character at this point. Might change later. This script can be very useful for GNU screen(1) users since the screen(1) interface will send a warning to the current display when a bell character appears in any of the windows.