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
What is a wrapper script thana UNIX for Dummies Questions & Answers 1 01-28-2008 07:11 AM
How was the Gollum Developed? Legend986 Post Here to Contact Site Administrators and Moderators 2 12-09-2007 07:37 PM
Bug has developed arjunjag High Level Programming 3 07-23-2007 08:08 AM
Wrap Interactive Script meskue Shell Programming and Scripting 0 06-23-2006 06:21 PM
What is wrapper script and how to write chiru UNIX for Dummies Questions & Answers 1 06-12-2006 05:23 AM

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

Join Date: Mar 2008
Posts: 1
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
Sponsored Links
  #2 (permalink)  
Old 03-17-2008
Registered User
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 353
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
Bits: 0 [Banking]
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: 144
How about

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

Bookmarks

Tags
None

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 06:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66