BurntSushi / xsv

A fast CSV command line toolkit written in Rust.
The Unlicense
10.29k stars 317 forks source link

Zero pad filename (--filename option to split) #277

Open d6y opened 3 years ago

d6y commented 3 years ago

I sometimes need to split a CSV into batches of rows, process them, and then recombine them. It would be convenient if the --filename argument allowed for {} to be zero padded to preserve file sort ordering (during shell scripting; eg., the ls ordering).

For example, when batching into blocks of 30 rows, I'd like to see 000.csv, 030.csv, and so on. Currently, I might see 0.csv, 120.csv, as the ordering with 30.csv appearing later.