main
public static void main(java.lang.String[] args)
Usage: $0 [-h header-separator] [-f footer-separator] [-g filename-regexp]
[-o output-filename] [-s separator-string] [-e charset] [-p output-path] file file ...
Reads text input file, and splits it to separate files, using separator-string
as a divider. If no separator-string is given, default separator-string "\n" is used.
If header-separator and/or footer-separator are specified, the
output files will all begin and/or end with header and/or footer from the
input file, defined by these separators. Also, splitting is not performed
before header and after footer, if they are specified. In other words,
each output file will have header from the input file, followed by a split
middle section from the input file, and finally followed by a footer from
the input file.
If filename-regexp is given, each output file will be named with the regexp
match of filename-regexp applied to the current divider match by separator-regexp,
and will share their filename extension as the input file.
If output-filename is given, it will be used as the output filename base, and
output filenames will be constructed by appending the base file name with
underscore and a sequential number starting with 0. Again, the output files will
share their filename extension with the input file.
From filename-regexp and output-filename, filename-regexp takes precedence.
If neither is given, the base filename will be the base file name of the input
file, and underscore + sequence number are used.
- Parameters:
args
- the command line arguments