New wrapper script will be developed to wrap two ksh scripts


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting New wrapper script will be developed to wrap two ksh scripts
# 1  
Old 03-16-2008
New wrapper script will be developed to wrap two ksh scripts

Hi friend,Smilie

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

Please help me with it,

thanks,Smilie
Ishai
# 2  
Old 03-17-2008
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  
Old 03-17-2008
What's wrong with

Code:
script1
# the shell waits until script1 finished, by design
script2

era
# 4  
Old 03-17-2008
How about

Code:
script1 && script2

script2 will be executed only if script1 finished successfully.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Wrapper script Oracle look KSH

I have a KSH script that I want to call in a loop for each row in the above table --- new_script.ksh (psuedo code) the contents on this new script would be something like below... for t in (select table_name,schema_name from laod_table) loop /bin/load_table.ksh t.table_name... (4 Replies)
Discussion started by: vr23
4 Replies

2. Shell Programming and Scripting

KSH - How to call different scripts from master scripts based on a column in an Oracle table

Dear Members, I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc. I would like to create a script which will will call other scripts based on the request action. Can we directly read from the REQUEST_ACTION... (2 Replies)
Discussion started by: Yoodit
2 Replies

3. Shell Programming and Scripting

Wrap lines with awk to create SQL script

Greetings! Some of my files list hardware errors (we test electronic components), some have none. If the file name has no errors, I still want to display a message like "No error", else I display the error from the file itself. I came up with this (with help) for myfile in `find . -name... (2 Replies)
Discussion started by: alan
2 Replies

4. UNIX for Advanced & Expert Users

Pass parameter to the main script from wrapper script

Hi, I am writing a wrapper script(wrap_script.sh) to one of the main scripts (main_script.sh) The main script is executed as following: ./main_script.sh <LIST> <STARTDATE> <ENDDATE> looks for a parameter which is a LIST(consists of different list names that need to be processed), START/END... (0 Replies)
Discussion started by: stunnerz_84
0 Replies

5. Shell Programming and Scripting

Wrapper Script Help With Perl Scripts

I have tried looking through wrapper scripts throughout the forum, but I don't think they were able to answer my question (either that or I'm just confused). Basically, I have a Perl script that I want to run in parallel 4 times with parameters, wait for all of them to finish, then run another... (8 Replies)
Discussion started by: kooshi
8 Replies

6. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

7. Shell Programming and Scripting

Handling values with space while passing commandline argument from wrapper script in KSH

Hi there, I have a wapper script which passes the argument from command prompt to inner script.. It works fine as long as the argument containing single word. But when value contains multiple word with space, not working as expected. I tried my best, couldn't find the reason. Gurus, pls.... (2 Replies)
Discussion started by: kans
2 Replies

8. UNIX for Dummies Questions & Answers

What is a wrapper script

I tried searching the forum ,,but couldn't locate ..Can anyone give me a link or some information about wrapper script. (1 Reply)
Discussion started by: thana
1 Replies

9. Shell Programming and Scripting

Wrap Interactive Script

Does anyone know of a program to wrap an interactive script into an application..I tried using platypus but i want a utility to allow interactive scripts to be run in a stand-alone window to avoid .profile settings on multiple computers...platypus provides the option of a text window output but... (0 Replies)
Discussion started by: meskue
0 Replies
Login or Register to Ask a Question