Page 2 of 2

Posted: Wed Dec 20, 2006 2:10 pm
by DSguru2B
Yea, but the duplicates need to be removed plus some more manipulation.

Posted: Wed Dec 20, 2006 2:21 pm
by Ultramundane
I did not see any mention of duplicates.

Can you tell me the additional manipulation. I ran the job with the sample data and it works.

I must be missing something. :?

Posted: Wed Dec 20, 2006 2:24 pm
by DSguru2B
No i mean the product (first column) is being repeated, need to get only unique values to build file names.

Posted: Wed Dec 20, 2006 2:27 pm
by Ultramundane
Awk keeps track of the open files and once opened it will only append to the files. Using this method you do not need to get the unique filenames. Awk will overwrite/create when opened (used first time) and will append for the rest.

Posted: Wed Dec 20, 2006 2:29 pm
by ray.wurlod
120267 wrote:Ray,

The count of the products are not Defined, It is dynamic.If we get 60 products we have to split as 60 files with product name as the file name.We may get more than 100 products also.Is there any solution with out implementing using loop.
I answered the question that was asked.

Posted: Wed Dec 20, 2006 2:35 pm
by DSguru2B
Ultramundane wrote:Awk keeps track of the open files and once opened it will only append to the files. Using this method you do not need to get the unique filenames. Awk will overwrite/create when opened (used first time) and will append for the rest.
O yea thats right. Just needs testing it. Nice...

Posted: Wed Dec 20, 2006 2:38 pm
by Ultramundane
I just created 500 products in random order and many with different codes and in random order it worked. I got multiple entries and the files got created.

Sorry I am not premium member yet and missed the beef of your message.