Closed derekmahar closed 9 months ago
Actually, I do not fully understand what's the purpose of the commands. Can we just
find ./ -name "*.csv" \
| csvtk concat --infile-list - \
| csvtk del-header -o result.csv
Yes, but I think csvtk concat
better describes the intent of the operation. Command csvtk concat --del-header
would simply be a synonym of csvtk del-header
. Another idea might be to implement csvtk --del-header
which would apply to every subcommand.
The option --infile-list
is very useful in cases where the input file list is long.
I'm closing this issue because it duplicates existing behaviour.
Actually, I do not fully understand what's the purpose of the commands. Can we just
find ./ -name "*.csv" \ | csvtk concat --infile-list - \ | csvtk del-header -o result.csv
I would just like to second that having a global option to not output a header would be great. del-header
obviously does this, but it would simplify many of my pipelines if there was a global option to just not out the header, thus removing one command from my pipeline
Sounds reasonable and might be also helpful for others. Please create a new issue, in case this one being ignored.
gosh, it's added, it's a lot of work. @derekmahar @mbhall88
- add a new global flag
-U, --delete-header
for disable outputing the header row. Supported commands: concat, csv2tab/tab2csv, csv2xlsx/xlsx2csv, cut, filter, filter2, freq, fold/unfold, gather, fmtdate, grep, head, join, mutate, mutate2, replace, round, sample.
$ (echo a; seq 3) | csvtk head -n 3
a
1
2
3
$ (echo a; seq 3) | csvtk head -n 3 -U
1
2
3
Thank you for implementing this feature!
Please consider adding option
--del-header
(or similar) tocsvtk concat
. Consider the scenario of usingxargs
to concatenate a large number of CSV files:Output:
If
csvtk concat
had option--del-header
, we could replacexargs csvtk del-header
withxargs csvtk concat --del-header
:Desired output:
Prerequisites
csvtk version
csvtk concat
.Describe your issue