Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!robohack!eci386!ecicrl!clewis From: clewis@ferret.ocunix.on.ca (Chris Lewis) Newsgroups: comp.unix.questions Subject: Re: bells and beeps Keywords: bell Message-ID: <1495@ecicrl.ocunix.on.ca> Date: 14 May 91 18:41:25 GMT References: Organization: Elegant Communications Inc., Ottawa, Canada Lines: 24 In article ratzan@pilot.njin.net (Lee Ratzan) writes: >we are novice unix users running a hewlett-packard 9000/835 under >hp-ux (a berkeley and at &tt unix hybrid. how do we activate >a keyboard beep from within a korn shell script? the idea is >to warn users of invalid entries before the screen clears. Others will suggest echoing a control-G. Which works on most terminals. Most versions of UNIX (at least, ATT'ish ones) have a generic interface to terminals called terminfo, in which each type of terminal is described so that various applications can figger out how to control the terminal. With terminfo, there is a command called "tput". A slightly more generic solution to getting a beep would be to call: tput bel Which consults the database and emits the sequence required to get a bell. Tho, in some cases, people have redefined it to do other "obvious" things. (eg: inverse flash the screen - eugh ;-) You can use tput to emit other things too without having to know the interface to the terminal. -- Chris Lewis, Phone: (613) 832-0541, Domain: clewis@ferret.ocunix.on.ca UUCP: ...!cunews!latour!ecicrl!clewis; Ferret Mailing List: ferret-request@eci386; Psroff (not Adobe Transcript) enquiries: psroff-request@eci386 or Canada 416-832-0541. Psroff 3.0 in c.s.u soon!