[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] read that understands quoting
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] read that understands quoting |
Date: |
Mon, 12 Mar 2012 08:30:19 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
On 3/12/12 8:23 AM, Greg Wooledge wrote:
> If your real goal is parsing Microsoft-ish "CSV" files, rather than
> Apache log files, then you're going to end up using the third one,
> because xargs can't handle embedded escaped quotes.
If your real goal is parsing csv files with embedded quotes, use the
code from Kernighan and Pike's "The Practice of Programming." It's
small and clean and can be adapted to many purposes.
http://cm.bell-labs.com/cm/cs/tpop/index.html
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/