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 > 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 08:11 AM
How was the Gollum Developed? Legend986 Post Here to Contact Site Administrators and Moderators 2 12-09-2007 08: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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-16-2008
ishai82 ishai82 is offline
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
  #2 (permalink)  
Old 03-17-2008
nua7 nua7 is offline
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
  #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
  #4 (permalink)  
Old 03-17-2008
agn agn is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 172
How about

Code:
script1 && script2
script2 will be executed only if script1 finished successfully.
Sponsored Links
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 10:05 PM.


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