Suppose I have:
cat file
"Field 1, Line 1",Field 2,"Field 3, Line 1"
"Field 1, Line 2",Field 2,"Field 3, Line 2"
With Miller, I want to produce:
"Field 1, Line 1"
"Field 2"
"Field 3, Line 1"
"Field 1, Line 2"
"Field 2"
"Field 3, Line 2"
I tried this:
mlr --csv -N --ofs lf --quote-all cat file
Which produces no output.
As a workaround, I can do this:
mlr --csv -N --ofs pipe --quote-all cat file | sed 's/"\|"/"\n"/g'
Or use ruby:
ruby -r csv -e 'CSV.parse($<.read).flatten.each{|r| puts [r].to_csv(force_quotes: true)}' file
But it does feel that I should be able to just look at a csv file one field at a time (and ignore records) with Miller?