From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5aed20f12bb9ba5ff42a3445a65eeb24@quanstro.net> Date: Fri, 28 Apr 2006 09:43:19 -0500 From: quanstro@quanstro.net To: 9fans@cse.psu.edu Subject: Re: [9fans] csv files -> embarrasing In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 4a3aca68-ead1-11e9-9d60-3106f5b1d025 i had this problem years ago processing original yahoo categories. i think the solution is to use regexps to do a "lifting". first translate the commas within "..." to, say, "=E2=98=BA". then do your csv operation and finally translate the "=E2=98=BA" back to ",". this is totally untested, but something like this: # should be f* and f*'=20 fn fstar { { echo 'X ,x:"[^"]*": s:,:=E2=98=BA:g' echo ,p } | sam -d $* } fn fstartick { { echo 'X ,x:"[^"]*": s:=E2=98=BA:,:g' echo ,p } | sam -d $* } for(i in $files) fstar $i | extract | fstartick /fd/0 - erik