The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Call scripts in Rpm's: %pre %post sectino vibhor_agarwali Linux 2 03-30-2009 02:18 AM
how to call two programs simultaneously vipinccmb UNIX for Dummies Questions & Answers 1 08-11-2008 02:48 AM
How to call C functions in shell scripts? agarwal Shell Programming and Scripting 5 04-09-2008 01:03 AM
Mother Board Drivers ...........?? haisubbu UNIX for Dummies Questions & Answers 1 12-07-2006 01:13 PM
Making a SOAP call from within unix shell scripts Laud12345 Shell Programming and Scripting 2 02-16-2005 02:23 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-08-2009
juliyp juliyp is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 6
To call many scripts from mother one simultaneously

Hi,
I need to rin few other scripts from one main (mather) script. Working in ksh on LINUX. The only one condition - it should be run in parallel.
I mean I have to be able to call 20 scripts from this mother script in parallel (start them in the same time). Does somebody know how to do it?

Thanks,
Juliy

Last edited by juliyp; 06-08-2009 at 04:53 PM..
  #2 (permalink)  
Old 06-08-2009
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,423
call each script one by one and run them in background
scr1 &
scr2 &
scr3 &
.
.
.
scr20 &
  #3 (permalink)  
Old 06-08-2009
wpeckham wpeckham is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 12
Simple loop to start them all

#!/bin/ksh
# the one-ring script
# to start them all

# a variable to hold all of the script names
SCRIPTLIST="script1
script2
script3
...
script20"

# start all child scripts in background
for foo in $SCRIPTLIST ; do
${foo} &
done

# only continue when they all finish
wait

# rest of master script
...
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 07:10 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