Implement the dog bash utility dog is a command-line utility that takes in an arbitrary number of arguments,
the first of which is the text to be written and the others are arbitrarily many files.

The dog utility will split the text in equal portions over these files. If there is a remainder n, the first n files get an additional byte

dog is the opposite of cat, as such, forall x, the following should hold.

$&gt; dog x a.txt b.txt ...
$&gt; cat a.txt b.txt ...
x$&gt;


Where ... indicates arbitrarily many files.

An example (12 bytes, 3 files, can be split evenly):

$&gt; ./dog.py "Dogs vs Cats" a.txt b.txt c.txt
$&gt; cat a.txt
Dogs$&gt; cat b.txt
 vs $&gt; cat c.txt
Cats$&gt; cat a.txt b.txt c.txt
Dogs vs Cats$&gt; 


An example with remainder (13 bytes, 5 files, remainder 3):

9$&gt;./dog.py "0123456789abc" a.txt b.txt c.txt d.txt e.txt
$&gt; cat a.txt
012$&gt; cat b.txt
345$&gt; cat c.txt
678$&gt; cat d.txt
9a$&gt; cat e.txt
bc$&gt; cat a.txt b.txt c.txt d.txt e.txt
0123456789abc$&gt;
Pyth - 12 bytes
.wMC,cl.zz.z

Uses builtin split function and then uses splat-map on the write function. Doesn't work online.