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
Passing a variable from a child script back to the parent Andy82 Shell Programming and Scripting 3 05-26-2008 09:52 PM
parent shell is waiting upon the child shell ruchirmayank Shell Programming and Scripting 0 05-06-2008 04:08 AM
How to know parent script name from child script raki Shell Programming and Scripting 2 06-05-2006 08:01 AM
Returning values from child to parent shell acheepi Shell Programming and Scripting 4 07-15-2005 03:25 PM
return valuse from child script to parent script borncrazy Shell Programming and Scripting 1 08-20-2004 03:39 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 05-06-2008
sasaliasim sasaliasim is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 22
Question Parent/child Korn shell script help

I have the following two Korn shell scripts:

SHELL1.ksh
#!/usr/bin/ksh
nohup sas /abc/123/sasprogram1.sas &

SHELL2.ksh
#!/usr/bin/ksh
./SHELL1.ksh
wait
nohup sas /abc/123/sasprogram2.sas &

My goal is to run SHELL1.ksh within SHELL2.ksh. SHELL1.ksh runs sasprogram1.sas. I would like SHELL2.ksh to wait until sasprogram1.ksh(within SHELL1.ksh) finishes before running sasprogram2.sas.
  #2 (permalink)  
Old 05-06-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,720
Put the wait in SHELL1
Code:
#!/usr/bin/ksh
nohup sas /abc/123/sasprogram1.sas &
wait


#!/usr/bin/ksh
./SHELL1.ksh
nohup sas /abc/123/sasprogram2.sas &
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 09:46 PM.


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