shell scripting-processing multiple scripts


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting shell scripting-processing multiple scripts
# 1  
Old 07-06-2009
shell scripting-processing multiple scripts

I have four scripts to run.
My 1st script will make script2 and script3 to run. I am setting a cron job for this script1 to run continuously.
This script1 will check for 2 text files and based on the existance of those text files it will initiate the script2 and script3.

Now my doubt is that is there a way to know when the script2 finishes its processing and script3 finishes its processing so that i can do some processing in the script1?
Please help me with your ideas.
# 2  
Old 07-06-2009
Bug

You can design a common script which inculdes your condtions to call consecutive scripts and put that common script in cron.

Or In cron, Mention && operator to execute a job if the first job gets success. like job1 && job2
# 3  
Old 07-06-2009
If you like run your script in background then you can wait.
Code:
# start process
./somescript >> somescript.log 2>&1  &
ChildPID=$!
wait $ChildPID
echo "Now I can continue"

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Export Oracle multiple tables to multiple csv files using UNIX shell scripting

Hello All, just wanted to export multiple tables from oracle sql using unix shell script to csv file and the below code is exporting only the first table. Can you please suggest why? or any better idea? export FILE="/abc/autom/file/geo_JOB.csv" Export= `sqlplus -s dev01/password@dEV3... (16 Replies)
Discussion started by: Hope
16 Replies

2. Shell Programming and Scripting

Parallel processing in AIX (bash shell scripting)

Hi all, I am struggling to build a utility which can do the parallel processing. I achieved same in Linux using xargs -P but same is not working on AIX. I am building file copy utility where I will have all required info in a file (like souce file info and target location details), now i need... (2 Replies)
Discussion started by: ankur singh
2 Replies

3. Shell Programming and Scripting

Multiple shell scripts executed in one script

Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only.. it... (6 Replies)
Discussion started by: Madhu Siddula
6 Replies

4. Shell Programming and Scripting

Multiple shell scripts executed in one script

Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only.. it... (1 Reply)
Discussion started by: Madhu Siddula
1 Replies

5. Homework & Coursework Questions

Help with Shell Scripts Using sed in multiple files.

Hi, I was hoping that someone could help me. I have a problem that i am trying to work on and it requires me to change text within multiple files using sed. What i have so far is !/bin/sh File1="$3" File2="$4" File3="$5" testNum="$File1" while test "$testNum" <= "$File3"; do echo... (12 Replies)
Discussion started by: Johnny2518
12 Replies

6. Shell Programming and Scripting

Help with Shell Scripts Using sed in multiple files.

Hi, I was hoping that someone could help me. I have a problem that i am trying to work on and it requires me to change text within multiple files using sed. I use the program to change an occurance of a word throughout different files that are being tested. At first i had to Create a new script,... (1 Reply)
Discussion started by: Johnny2518
1 Replies

7. Shell Programming and Scripting

How to batch-processing numerous shell scripts?

How to batch-processing numerous shell scripts? how to record the result of all the scripts as a report? then, I can analysis the process result. I want to process numerous shell scripts in my working directory: the directory name is consistent with shell scripts name, that is to say,... (2 Replies)
Discussion started by: qcmao
2 Replies

8. UNIX for Dummies Questions & Answers

Script Problem-Processing multiple scripts

Hi All, I have four scripts to run. My 1st script will make script2 and script3 to run. I am setting a cron job for this script1 to run continuously. This script1 will check for 2 text files and based on the existance of those text files it will initiate the script2 and script3. Now my doubt... (2 Replies)
Discussion started by: RSC1985
2 Replies

9. Shell Programming and Scripting

How to make the same change in multiple shell scripts?

I would like to make the same change in multiple shell script files and would like to know if anyone can be of some help? I would appreciate it. (4 Replies)
Discussion started by: rdakhan
4 Replies
Login or Register to Ask a Question