coreutils
[Top][All Lists]
Advanced

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

Re: Support for CSV file format on sort


From: Erik Auerswald
Subject: Re: Support for CSV file format on sort
Date: Sat, 30 Jan 2021 19:45:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi,

On 30.01.21 18:36, ✓ Paul Courbis de Bridiers de Villemor wrote:
Le sam. 30 janv. 2021 à 17:58, yon ar c'hall <yon.ar.chall@gmail.com> a
écrit :

I'm planning to make some changes to the sort utility for supporting the
CSV file format, in particular about quoting, as described in RFC 4180.

Actually I’d prefer to have reliable tools to convert csv to tsv and tsv to
csv, replacing tabs and newlines by \t \n and to be able to use all
standard tools

I think it might help to allow specifying an output field
separator, and ensure that this separator is not part of the
CSV field data.  It could then remove the quoting.  The tool
should probably fail if this cannot be done, i.e., if the
intended field separator is found inside the field data.

The result would then be sortable by specifying the appropriate
field separator.  Other tools that allow specifying a field
separator (cut, paste, awk, column -t, ...) could then be used
to work with the data as well, not just sort.

If such a tool, or a companion tool, could reverse the action,
i.e., create a CSV file with proper quoting from input data
with unquoted fields separated by a given character, that would
allow to transform the manipulated output from above to CSV
format again.

Thanks,
Erik



reply via email to

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