Split large file, have arbitrary start index number

Posted by nEJC on Ask Ubuntu See other posts from Ask Ubuntu or by nEJC
Published on 2011-01-01T14:01:21Z Indexed on 2011/01/01 14:59 UTC
Read the original article Hit count: 181

Filed under:

I do a lot of file manipulation on my system and in one particular batch job I end up with around 16 Gb file. I need to prepare this data into smaller chunks for another process.

I split it into 10k lines per file and numeric index, padded to 5 digits

split -a 5 -d -l 10000 large_input_file /out_path/out.

This way I end up with files named
out.00000
out.00001
...

The problem is that this way indexing always starts with 0.
Is there a way to set it to arbitrary starting index? man reveals nothing ...

© Ask Ubuntu or respective owner

Related posts about command-line