Is there a way to specify quoted nature of input file ?
Trying to normalize some files that may be quoted or unquoted. Either double or single quotes may be used . But single quotes don't seem to be removed.. Is there a flag that can be added as --iqs (input quote character or specifier) ,
Here's a sample test:
$ echo ",,'42',,,,,0.00,'USD',100.74
more> ,,'42',,,,,0.00,'USD',100.74
more> ,,'42',,,,,0.00,'USD',100.74
more> ,,'42',,,,,0.00,'USD',100.74
more> ,,'42',,,,,0.00,'USD',100.74
more> ,,'42',,,,,0.00,'USD',100.74" | mlr --csv --implicit-csv-header --quote-none cat
1,2,3,4,5,6,7,8,9,10
,,'42',,,,,0.00,'USD',100.74
,,'42',,,,,0.00,'USD',100.74
,,'42',,,,,0.00,'USD',100.74
,,'42',,,,,0.00,'USD',100.74
,,'42',,,,,0.00,'USD',100.74
,,'42',,,,,0.00,'USD',100.74
Thanks, Ashish
I was rather strict about the RFC-4180 CSV spec (https://tools.ietf.org/html/rfc4180). This would be a bit of rework for sure. :^/
Thanks, wishlist is the right label :) As csv is text of printable characters, people use weird delimiters and quotes to prevent conflict with descriptive string fields. This would be a generic extension as --irs, --ifs, --ips allow specifying a lot of nuances.
Good point! :)