On 05May2006 15:46, Yogendra <[EMAIL PROTECTED]> wrote:
| I have a script which takes big data files as arguments and load the
| data into Tables.
|
| Now I want to run 2 or 3 data files in Parallel instead of creating 2-3
| new scripts each doing same thing for individual file.
|
| I want to load Data from text file into tables concurrently . FORK is
| something i can use in KSH but How I am not sure.
Fork happens all the time, you just don't notice.
This command sequence:
foo1
foo2
Forks the shell (for the first command). The original shell then waits
for the forked process to exit before attempting the second command.
The forked process execs "foo1", which runs and then exits.
After it exits, the original shell repeats this process for the second
command, and so on.
This command sequence:
foo1 &
foo2 &
is handled _exactly_ the same way, but the original shell does not
wait for the forked processes to finish before proceeding to the next
command. In this way, foo1 and foo2 run in parallel.
Generally, if you have a few things to run in parallel you would go:
foo1 &
foo2 &
foo3 &
wait
foo4
That kicks of 3 commands in parallel, and _then_ waits for them all to
finish before starting "foo4".
Does that help?
--
Cameron Simpson <[EMAIL PROTECTED]> DoD#743
http://www.cskk.ezoshosting.com/cs/
I understand a fury in your words, but not your words. - William Shakespeare
------------------------ Yahoo! Groups Sponsor --------------------~-->
You can search right from your browser? It¿s easy and it¿s free. See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/0XFolB/TM
--------------------------------------------------------------------~->
To unsubscribe from this list, please email [EMAIL PROTECTED] & you will be
removed.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/LINUX_Newbies/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/