yq
yq copied to clipboard
Support semicolon (;) as CSV separator
Please describe your feature request. I wish I could use yq to parse CSV files where fields are separated by semicolons instead of commas.
Describe the solution you'd like If we have input.csv like:
Header A;Header B
A1;B1
A2;B2
And we run a command:
yq -p csv -o json --csv-separator ; input.csv
# autodetection (maybe)
yq -p csv -o json input.csv
it could output
[
{
"Header A": "A1",
"Header B": "B1"
},
{
"Header A": "A2",
"Header B": "B2"
}
]
Describe alternatives you've considered Using another tool
Additional context Different locales have a different field separator than comma, as comma may be used for numbers instead of the English decimal point.
I like it, will be available in the next release (no auto-detection though sorry)
Fixed in 4.42.1