The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Can we launch a shell script automatically upon ssh login? rockysfr UNIX for Advanced & Expert Users 1 07-02-2007 10:48 PM
How to launch a Csh shell script using Excel Macro ? Raynon Shell Programming and Scripting 1 11-08-2006 12:22 PM
How do i launch the script within a script? Raynon Shell Programming and Scripting 2 10-03-2006 04:34 AM
script that will list .c programs Saggas UNIX for Dummies Questions & Answers 7 09-01-2005 09:22 AM
Script to launch terminal window? omerta SUN Solaris 5 06-30-2005 05:48 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-16-2008
j.middlefinger j.middlefinger is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 2
Creation of a script to launch several programs

I'm really new to this, so thanks for your patience...

I've been trying to create a script to launch several applications at once. I've been researching books and forums, but I end up with more questions than answers. As much as I hate to say it, I don't know if I can figure it out on my own...

Thus far, I have only been able to get the first app to launch.

So if I have two apps, /apps/abc/abc_1.1/scripts/runabc.sh and /apps/def/def_1.1/scripts/rundef.sh, how can I write a script that will launch them both?

Johnny
  #2 (permalink)  
Old 02-16-2008
matrixmadhan matrixmadhan is online now Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,950
Launch them both ?

Did you mean in a serial way or parallel ?

For serial launch,
In a wrapper script

have it as,

fire script1
fire script2
  #3 (permalink)  
Old 02-17-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
  
 

Join Date: Nov 2007
Location: New Zealand
Posts: 922
'Both at once' would mean in parallel surely?
Code:
#!/bin/sh
/apps/abc/abc_1.1/scripts/runabc.sh &
/apps/def/def_1.1/scripts/rundef.sh &
This will trigger both scripts then exit.

If either of the scripts write things out to the console they were started from, you might want to redirect their output:
Code:
/apps/abc/abc_1.1/scripts/runabc.sh > /dev/null 2>&1 &
  #4 (permalink)  
Old 02-18-2008
j.middlefinger j.middlefinger is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 2
Thank you very much for your posts!

I did mean parallel, just didn't know how to express it... I'm really new to this... It's working for me now...

Are there any tutorials or books that either of you would recommend to help me learn?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0