parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: csv with multiline records


From: Ole Tange
Subject: Re: csv with multiline records
Date: Wed, 14 Dec 2016 20:36:51 +0100

On Wed, Dec 14, 2016 at 2:04 AM, Ryan Brothers <ryan.brothers@gmail.com> wrote:
:
> Is there a way to use --pipe to process a csv that could have multiple
> lines for a single record?  For example:
>
> row1,"1
> 2
> 3"
> row2,4
>
> I'd like to treat the above as 2 rows for parsing purposes.

This would require GNU Parallel to parse the input as CSV. It does not.

But if you can somehow replace the record separator, then you can use --recend.

Given your input this might work:

    parallel --pipe --recend '"\n"

assuming a good part of the records have a last column with newlines.


/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]