I am using an R package. The input files required to run in the the package are large(as big as 65 Gb of size) So I have decided to split the file in chunks based on line number and then merge the Final Output into a single file. Also I want to do the whole process in PERL.

How should I go about writing a code for the same?

  • I need to calculate something in each line of the chunk files.@αғsнιη – user8393448 Jan 25 '18 at 11:08
split -l numberoflines inputfile

Huge file will splitted as xaa,xab,xac and so on

finally you can concatenate as cat xa* >> final_output_file

If i want to split file for every 65 lines then use below command


split -l 65 inputfile
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.