LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-25-2005, 03:19 PM   #1
Ian D
Member
 
Registered: Aug 2005
Location: Solihull, UK
Distribution: Fedora 39
Posts: 215

Rep: Reputation: 18
launching programs from a bash script


I last looked at writing shell scripts about 15 years ago. All I can remember is that you can do wondrous things with them.

I want a script which will launch two programs to run concurrently.

I have played around and made my script launch one program - but I suspect that the script hung around waiting for the program to finish before it considered doing anything else.

How do I make it start the second within the flick of a gnat's whisker of the first?

Ian
 
Old 10-25-2005, 03:31 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
By detaching the first one using an & behind its name.


Cheers,
Tink
 
Old 10-25-2005, 04:31 PM   #3
Ian D
Member
 
Registered: Aug 2005
Location: Solihull, UK
Distribution: Fedora 39
Posts: 215

Original Poster
Rep: Reputation: 18
Thanks Tink,

I thought that I had got everything doing just what I wanted - but it turned out not to be so.

Here's what I have.

Program 2 is recording sound which, after recording, I want to break up into manageable chunks. I have Program 2 running from within the script. I terminate Program 2 with a Ctrl-C The execution of Program 2 is the last thing in the script. Ctrl-C probably actually closes the script.

Program 1 is a little GUI application which has a button on it. Each time I press the button is a point where I intend to break the sound file. Program 1 outputs to stdout which is redirected to a file.

If I close Program 1 and then close Program 2 (Ctrl-C), I have all the times safely recorded in the file I re-directed to. If I close Program 2 first, Program 1 disappears, and the file I re-directed to, although it exists, has a size of 0.

Apart from the obvious (Remember to close Program 1 first), what should I do to preserve my timings?

Ian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Launching external programs from OpenOffice jswhite Linux - Software 3 10-07-2005 12:44 PM
Launching Programs from KDE as SU xanimal Linux - Software 4 06-10-2005 01:53 PM
programs and windows launching on bootup ergo_sum Linux - Newbie 6 05-03-2005 09:18 PM
launching programs from command line in FS dertien Linux - Software 1 11-26-2004 09:27 AM
icewm and launching programs six6 Debian 2 10-21-2004 03:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration