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, "☺". then do your csv
operation and finally translate the "☺" back to ",".
this is totally untested, but something like this:
# should be f* and f*'
fn fstar {
{
echo 'X ,x:"[^"]*": s:,:☺:g'
echo ,p
} | sam -d $*
}
fn fstartick {
{
echo 'X ,x:"[^"]*": s:☺:,:g'
echo ,p
} | sam -d $*
}
for(i in $files)
fstar $i | extract | fstartick /fd/0
- erik