Parallel processing using AWK program

Hi All,

could any expert tell me about writing a parallel processing program using AWK program is possible or not? Any example would be much appreciated...

With Regards / Mysore Ganapati :confused:

Read two files in parallel:

$ head file*
==> file1 <==
file1, line1
file1, line2
file1, line3

==> file2 <==
file2, line1
file2, line2
file2, line3
$ nawk '1;(getline < "file2")' file1
file1, line1
file2, line1
file1, line2
file2, line2
file1, line3
file2, line3

sorry for not explaining you the question properly.

I've more than 10 input files with the size 10-15 giga bytes each. Also I've a some calculating machine (computing system) with 50 processors.
My AWK program has to read all the input files and based on some coditions it has to do some calculations and has to generate more than 100 report files. Hence I thought to utilize all the 50 processors for this computation through AWK script.
I know it is possible using perl script (using object oriented perl and by creating child processes using 'fork()' ).
So I wanted to replace perl with AWK for the above task if it is possible.
Please suggest me.

-- Mysore Ganapati

standard awk/nawk/gawk has no builtin support for parallel processing or threads

Thanks for your clarifications.

Eventhough AWK doesn't have any support for multiprocessing, are there any possibilities/ways to implement the same using AWK programming with some unix tools? :o
Sorry for the twisted and repeated question. But I wanted to make sure before thinking of other programming for the above mentioned requirement.

Cheers ~~ /.. Ganapati

i don't know how to write parallel processing using awk.
but most definetely u can write very powerful parallel processing programs using C programming and MPI library (message passing interface)

MPI supports multiple platforms and can be used to accomplish any task.
try google it out...else mail me at removed
i can help u on how to go about learning MPI and C programming.