Questions tagged [split]

281 questions
16
votes
4 answers

Split: how to split into different percentages?

How can I split a text file into 70% and 30% using the split command ?
aneuryzm
  • 1,925
1
vote
1 answer

split not working as required?

I want to split a file into 'n' chunks, the suffixes should be of 'a' length and should using numeric suffixes starting from number 'd'. e.g. n = 10, a=4, d=5, As all options look correct and I tried the below split -n10 -a4 -d5 somefile split:…
mtk
  • 27,530
  • 35
  • 94
  • 130
0
votes
0 answers

Split a file into 8 files depending on the number of records

I have a file with 10K records and I need to divide it into 8 files. I used split -n l/8 -d file1 file2. This will split the file into 8 files, but I need to divide the file into 8 depending on the data/records in it. For example, case $1 …
0
votes
1 answer

Split a text file with customize name and size

I use Debian and I have a text file and I want to split that into several files with specific suffix name and size. I want split that file by n chunk therefore, I should use -n option. How can I do that with split command? Thanks
fedora
  • 41
0
votes
3 answers

How do I split text into rows and print its corresponding value?

I want to split a text into rows and print its value, for example, change this: YLB; YLR; YLS (tab) 30 Into this: YLB (tab) 30 YLR (tab) 30 YLS (tab) 30
-1
votes
1 answer

Line based chunking by size?

Github restricts file uploads to 100mb. This is unfortunate for public data. I know I can split binary files with dd. What I would like to do is split them all into 99MB files but here's the catch, I don't want to split on a line -- only a newline.…
Evan Carroll
  • 30,763
  • 48
  • 183
  • 315