%file first.txt these are the lines of first.txt %file second.txt these are the lines of the second file %file third.txt the third fileand the results are three files each containing the lines between the directive %file and next one.
You start the program using the command line:
ssplit file [directory]
to split the file into the directory. The default directory is the current one.
You can change the directory using the directive %dir in the source file. The directory
given on the command line, the directory given on the directive %dir and the actual
file name are appended to calculate the result file. Directories are automatically created.
When a file has the same content as it had before it is not saved over the old one. This means that tools, like make can depend on file time.
Why do anyone need this tool? You may not. It is a matter of taste how big files you like to edit and maintain. Sometimes I have to edit many small files. Those times it is better to have a larger one.
Program source Perl program, this is a text file. You may need CRLF conversion if I uploaded the wrong way or if you are on a different opsys.
Documentation source in a single file. (Do not just click on it! Push the right eye of your mouse, Save target as and use notepad, vi, more as you like.) Be aware that the documentation is made using jamal under Windows NT. This means that this example source file will contain not only pure HTML but also weird macros. You may also be interested to have a look at the Windows NT command file that starts the scripts to generate the final HTML that you read. Note that the script locations reflect those I have on my web development system. Also be aware that this weird script first splits the source file, then applies jamal to generate another command file that processes all files with extension .jam that were generated. May be woth looking at how it works.
You might consider it a bug: