As a one-liner (wrapped for posting)
Adjust the 2**21 (2MB) to suit. The output files are given the input filename.n (n=0 .. n)
perl -e"BEGIN{$/=\2**21;binmode STDIN; $n=0}" -ne"open my $fh,'>:raw', $ARGV.'.'.$n++; print $fh $_;" filename
In reply to Re: Split a file
by BrowserUk
in thread Split a file
by swift
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |