Re: bell boing scriipt quits



Tango2 wrote:
I added a .wav sound file to be executed based on a conditional comparison. When exec aplay /.../.../.../....wav runs the script stops.
When I exec other commands it returns to my script what is going on?
Suggestions please and thanks.

Whenever you call the command 'exec', it won't return until the command finishes running. That's how it is documented to work. If you append an "&", that job will run in the background and exec will return (almost) immediately. That, too, is documented.

If you are seeing commands that return quickly it is likely because the command finishes almost instantly whereas aplay probably does not.

Your best bet is to include an "&" as the last argument to exec:

exec aplay /.../.../.../....wav &]

--
Bryan Oakley
http://www.tclscripting.com
.



Relevant Pages

  • Re: Scheduled script problem
    ... A vbs script that sets up a command to run a batch file, calls EXEC on the ... until the scheduler stops the script after the maximum allowed time to run. ...
    (microsoft.public.windows.server.scripting)
  • Re: Scheduled script problem
    ... A vbs script that sets up a command to run a batch file, calls EXEC on the ... until the scheduler stops the script after the maximum allowed time to run. ...
    (microsoft.public.windows.server.scripting)
  • Re: how do you get a handle to the interpreter?
    ... > launch it from the tcl script via exec, rather than creating it as a tcl ... > made into a command ... Umm, if you are launching it via exec it is a complely different process, ...
    (comp.lang.tcl)
  • Re: How to change password for sa?
    ... I've got some grid after performing this script. ... but no command or any other means to affect the problem I ... >> EXEC sp_changedbowner 'TempOwner' ...
    (microsoft.public.sqlserver.security)
  • Re: setting set -x for just one command
    ... But not if you use it as the last command of a subshell. ... I was supposed to write a wrapper for this script. ... because it was waiting for the 'exec' to complete. ...
    (comp.unix.shell)