Originally Posted by Migasi
Here is what I have to do and I wonder if there is an AWK or SED script to help me.
You'll have to write it yourself - awk would be the better option.
Take a small subset of the data and start coding - that way you can catch most of hte bugs before you get full-scale. When you have specific problems with the script we may be able to help.