in reply to Re: amalgamate similar lines
in thread amalgamate similar lines

I don't see where you assume that; AFAICT your solution will work whether or not that's true. Perhaps you are just pointing out that the operation will not be reversable if there are existing commas?
Implicitly, you are also assuming that records should be merged regardless of their position in the file; it's possible that only adjacent records should be candidates for merging.

Replies are listed 'Best First'.
Re^3: amalgamate similar lines
by Limbic~Region (Chancellor) on Jan 09, 2006 at 14:11 UTC
    ysth,
    With regards to the first assumption you called into question, that should have read:

    Concattenated records in the output will be identified by commas in the 3rd field. This assumes no commas appear in the 3rd field prior to merging. updated

    With regards to second assumption you mentioned. You are correct that since the AM only stated where the first two fields were the same that I assumed that meant they could appear anywhere in the file. That is the point of my post - to clearly state what is desired.

    Cheers - L~R