From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from orion.sas.upenn.edu(ORION.SAS.UPENN.EDU[165.123.26.31]) (4584 bytes) by braille.uwo.ca via smail with P:esmtp/D:aliases/T:pipe (sender: ) id for ; Sat, 15 Apr 2000 15:58:31 -0400 (EDT) (Smail-3.2.0.102 1998-Aug-2 #2 built 1999-Sep-5) Received: from wang (DIALIN1097.UPENN.EDU [128.91.20.73]) by orion.sas.upenn.edu (8.9.3/8.9.3/SAS.05) with SMTP id PAA16452 for ; Sat, 15 Apr 2000 15:58:32 -0400 (EDT) Message-ID: <002601bfa72e$1e76ce60$49145b80@wang> From: "Victor Tsaran" To: References: Subject: Re: Sound on command exit Date: Sat, 15 Apr 2000 15:53:07 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 List-Id: Sebo, wonderful! thanks for the tip, Vic ----- Original Message ----- From: "Sebastian Taralunga" To: Sent: Saturday, April 15, 2000 2:29 AM Subject: Re: Sound on command exit > > A simple way to get a beep on exiting a command is: > > command; echo ^G > > Where ^G is a real ^G and not just the characters ^ followed > by G. That is, in order to use it you have to press ^V > followd by ^G ( ^V tells the shell that a real ^G is > following ). > > ^G is similar to a beep; if one beep is not enough you can > use a command line like: > > command; echo ^G; sleep 1; echo ^G; sleep 1; echo ^G > > which would give you three beeps with one second delay > between them. > > You can also use a command like: > > alias f='echo ^G; sleep 1; echo ^G' > > in your .profile so that you can alias f to two beeps with > one second delay between them, from now on you can use > > command;f > > and here it is! > > Alternatively you can do is do create a small shell script > (say f) which you should place in one of the paths from your > $PATH; this script whould look like: > > #! /bin/sh > echo ^G; sleep 1; echo ^G > > which does exactely the same thing. > > This is the difficult way to accomplish that. > > > But from far away the most simple is to use a real ^G in > your $PS1 variable like this: > > PS1='\h:\w\$ ^G' > > The PS1 variable is the one which tells the shell what to > print as the command prompt. It is usually intialised within > the /etc/profile, and it looks differently for the root or > for the normal user. You can always change the value of this > variable and the changes take effect immediately. You can > change it's value within the .profile if you want a very > personalised profile. > > Now, on my system which is Slackware, the value of PS1 is > \h:\w\$ which means: the prompt shows me the hostname, the > current working directory and a $; so what I did I change > this and I added a ^G which means that any time I eiher > press enter or exit a command I will hear a beep. > > Please don't hesitate to ask any question if you need, I > really hope this helps, > > Have a nice day, > > Sebastian > > On Fri, 14 Apr 2000, Victor Tsaran wrote: > > > Hello, listers! > > Some of you have asked previously whether it is possible to have some sort > > of beep after certain command exits or certain task terminates. Yesterday I > > was playing around with Linux with another friend of mine, Luke Davis, who > > is yet another Linux user from Philadelphia. Accidentally, we recalled that > > Unix allows one to specify several commands on a single command line by > > dividing these commands with a semicolon. So, for instance, to run pine > > after your lynx exits you could enter: > > > > lynx; pine > > > > The Pine would fire up as soon as you quit Lynx. that opens a lot of > > interesting possibilities for providing temporary sound solutions to > > indicate termination of a background task or any other event. You could > > either run `play' command with your beloved .wav file on the command line or > > you could create a very short script called beep and exploit it. > > Say, we have a file called beep_when_you_re_done.wav and you'd like to know > > when your kernel finishes compiling. You might enter: > > > > make bzImage output.txt 2>&1 &; play beep_when_you_re_done.wav > > > > Now you can safely switch to another console and do other things. When "make > > bzImage" is finished, it will play the file. > > > > Hope this can help someone. > > Regards, > > Victor > > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup