Is it possible ????


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Is it possible ????
# 1  
Old 08-16-2007
Is it possible ????

Is it possible to run 2 scripts in parallel thru shell script ?????

e.g. main1.sh and main2.sh needs to run parallel.
How can i achive this ?????

Any suggestions ....
# 2  
Old 08-16-2007
it can be done by using FORK
# 3  
Old 08-16-2007
Hi Arunkumar,

Thanx a lot...can you give me sample how to run main1.sh and main2.sh thru fork.....
# 4  
Old 08-16-2007
For simple things use this:

./script1.sh &
./script2.sh &



Thats all !
# 5  
Old 08-16-2007
AFIK the & will do a background run ..Not a parallel run .. You have to use fork .. to run the two code paralelly ..
# 6  
Old 08-16-2007
yep joerg , by giving & it will run the scripts in Back ground..
by query is to run parallel, not one afteranother.

Arunkumar, Can u elaborate how can i use fork to run two scripts in parallel ......
# 7  
Old 08-16-2007
this
Fork (operating system - Wikipedia, the free encyclopedia)
will give you some idea's ...
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question