wireservice / csvkit

A suite of utilities for converting to and working with CSV, the king of tabular file formats.
https://csvkit.readthedocs.io
MIT License
6.03k stars 603 forks source link

Can the output of default headers (a,b,c,...) be suppressed when specifying the --no-header-row option? #1202

Closed sakamossan closed 1 year ago

sakamossan commented 1 year ago

I have a question while trying to combine multiple CSV files into one CSV file using csvkit.

I'm aware that I can avoid the default headers by using commands like | tail -n +2, but is there a way to use csvkit as a simple filter? Is there a method provided for this purpose?

ref

jpmckinney commented 1 year ago

This is not currently possible.

In what way is it interfering with what you're trying to do?

sakamossan commented 1 year ago

This is not currently possible.

Thank you for letting me know! Clarifying that has been sufficient.

In what way is it interfering with what you're trying to do?

It is not interfering.

I am running a script that appends JSON output to a CSV file every day, using the following command:

curl ... | in2csv -f json ... | tail -n +2 | tee -a ./out.csv

I simply questioned that it would be cleaner to avoid using the tail command in the pipeline. That's all.