This seems straight-forward until you realize that by default, few kinds of systems allow having hundreds or thousands of files open simultaneously.In my case I wrote a Python script to do the job and ended up with about 12,000 output files open at once, while attending to each of the more than ten million input files one at a time.Fortunately, Debian GNU/Linux is a system that can be instructed t