GNU bug report logs - #6277
cut: Please add CSV parsing

Previous Next

Package: coreutils;

Reported by: sandy bas <basic207 <at> gmail.com>

Date: Thu, 27 May 2010 03:03:02 UTC

Severity: wishlist

Tags: wontfix

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 6277 <at> debbugs.gnu.org (full text, mbox):

From: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
To: Bob Proulx <bob <at> proulx.com>,
    sandy bas <basic207 <at> gmail.com>
Cc: "6277 <at> debbugs.gnu.org" <6277 <at> debbugs.gnu.org>
Subject: RE: bug#6277: cut: Please add CSV parsing
Date: Fri, 28 May 2010 08:46:29 +0200
Bob Proulx wrote:

> sandy bas wrote:
>> Comma delimited files often have fields of the form "big,black,bear"
>> where the commas within the quotes are not delimiters. A useful
>> option in cut would be to ignore the commas (delimiters) within the
>> quotation marks.
>> 
>> I would be glad to put it in if you would like the option.

> I suggest that you use Perl, Python or Ruby for CSV processing.  They
> include full libraries for dealing with the many varied details of CSV
> handling.

just to mention another classic UNIX tool: awk

	awk -F, '$1 ~ /^big$/ { print $2,$3 }' csv.txt

Have a nice day,
Berny






This bug report was last modified 15 years and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.