小编Dan*_*iel的帖子

需要拆分大型csv文件

我有这个需要拆分成较小文件的 csv 文件。split -l 20000 test.csv 没问题我的问题是该文件包含不同的标题。想要拆分说每+-1000行,但它需要在pay header之后拆分,并且新文件需要以cust header开头。

客户头,xxx,xxxxxx,xxxxxx
txn 标头,xxxx,xxx,,xxxx,xxxxx,,xxx
详细标题,xxxx,xxxx,xxxxxx,xxxx,xxxx
详细标题,xxxxxxxx,xxxxxxxxxxxx,xxx,,
支付抬头,,,,,xxxxx,xxxxx
客户头,xxx,xxxxxx,xxxxxx
txn 标头,xxxx,xxx,,xxxx,xxxxx,,xxx
详细标题,xxxx,xxxx,xxxxxx,xxxx,xxxx
支付抬头,,,,,xxxxx,xxxxx
客户头,xxx,xxxxxx,xxxxxx
txn 标头,xxxx,xxx,,xxxx,xxxxx,,xxx
详细标题,xxxx,xxxx,xxxxxx,xxxx,xxxx
支付抬头,,,,,xxxxx,xxxxx

text-processing

2
推荐指数
1
解决办法
1818
查看次数

标签 统计

text-processing ×1