Computing.Net > Forums > Unix > Control execution of one script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Control execution of one script

Reply to Message Icon

Name: nauj
Date: June 1, 2006 at 11:19:23 Pacific
OS: AIX 5.1
CPU/Ram: IBM
Product: IBM
Comment:

I have a script than exec others scripts.
For example script 1 exec script2 (script 1 father of script2)

script2 &

In script1 I want to control the finalization of script1. I do this with that sentences:

ps -ef | grep script2 | grep -v "grep"

I make a loop that is making 'ps' until 'ps' returns nothing.

It runs, but I want to know if there is any other way of makinf this. I think there must be other way easier and better of control de execution of one script executed in background from other father script.

Anybody know other way??

Any advice will be greatly apreciattted



Sponsored Link
Ads by Google

Response Number 1
Name: lchi2000g
Date: June 1, 2006 at 11:47:11 Pacific
Reply:

script2 &
script3 &
wait <== wait will wait for all of this script's background processes (script2 and script3) to finish to continue the execution of next command(s)
...


Luke Chi


0

Response Number 2
Name: nauj
Date: June 1, 2006 at 12:29:42 Pacific
Reply:

Thank a lot, this is what I was looking for


0

Response Number 3
Name: lchi2000g
Date: June 2, 2006 at 14:55:12 Pacific
Reply:

I'm glad to be able to help

Luke Chi


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Control execution of one script

how to execute a expect script www.computing.net/answers/unix/how-to-execute-a-expect-script/5382.html

use variable of shell script in awk www.computing.net/answers/unix/use-variable-of-shell-script-in-awk/4570.html

remote access script www.computing.net/answers/unix/remote-access-script/2799.html