15th September 2005
I finally got around to adding some features to the GNU split command, which I felt were sadly lacking ever since I thought of them. :-)
I often use split to break huge files into multi-CD images, such as for backups or archiving. At the same time, I often find I'm low on disk space, so I would like to process each split file chunk as they appear instead of doing it all at once at the end.
I wrote a patch that adds exec and pause functionality with the following arguments:
-e, --exec=CMD run CMD after each output file is closed -w, --exec-wait=CMD run CMD after each output file is closed and wait for the child to exit -p, --pause pause for keypress after each output file is closed
I find these features very useful, so I hope they make it into the official coreutils tarball.
If anyone has any tips on how to handle recovering a tty-based STDIN (see the split source code), please let me know. I'm currently just open()ing the tty on STDOUT, but that is not ideal.