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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
What is a wrapper script thana UNIX for Dummies Questions & Answers 1 01-28-2008 04:11 AM
How was the Gollum Developed? Legend986 Post Here to Contact Site Administrators and Moderators 2 12-09-2007 04:37 PM
Bug has developed arjunjag High Level Programming 3 07-23-2007 05:08 AM
Wrap Interactive Script meskue Shell Programming and Scripting 0 06-23-2006 03:21 PM
What is wrapper script and how to write chiru UNIX for Dummies Questions & Answers 1 06-12-2006 02:23 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-16-2008
Registered User
 

Join Date: Mar 2008
Posts: 1
Stumble this Post!
New wrapper script will be developed to wrap two ksh scripts

Hi friend,

The script should invoke these scripts sequentially!
When one will finish the second will start.

Please help me with it,

thanks,
Ishai
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-16-2008
Registered User
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 330
Stumble this Post!
These steps should get you started.

This should get you started:

1)Invoke the first script.
2)Check for the process id (If the first script is running).
ps -ef | grep "Process id"
3)If you get an output, sleep for "x" seconds.
4)If there is no output, the script has finished.
5)Still as a verifying criteria , you can create a empty file at the end of the script.
6)Check if the file has been created.
7)If the file has been created, start the second script.
8)Delte the empty file in the second script, which was created in the first script.

If you need more help, paste your code by trying above and we can help you.

Thanks!
nua7
Reply With Quote
  #3 (permalink)  
Old 03-17-2008
era
Guest
 

Posts: n/a
Stumble this Post!
What's wrong with

Code:
script1
# the shell waits until script1 finished, by design
script2
Reply With Quote
  #4 (permalink)  
Old 03-17-2008
agn agn is offline
Registered User
 

Join Date: Feb 2008
Posts: 95
Stumble this Post!
How about

Code:
script1 && script2
script2 will be executed only if script1 finished successfully.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0