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. Is there an easy way to split up files into chunks based on their size, but not to mid-line.
Example
#/bin/sh
for i in $(seq 1 1000000); do
echo "This is a test sentence." >> file
done;
Now file
is 26MB. I would like that file to be split into 1 MB chunks, but never split anywhere but only a line-boundary (\n
).