STRFILE(6)
NAME
strfile − fortune(6) database loader
USAGE
strfile [options] sourcefile [datafile]
DESCRIPTION
Strfile creates a datafile of strings supplied in the sourcefile. The datafile consists of: a table describing the file (structure from strfile.h) a table of seek pointers to the beginning of the strings a series of null-terminated strings.
Strfile creates datafile from a sourcefile that consists of strings separated by lines that begin with a pair of delimiters (default delimiter is ’%’).
Among other things, strfile is used to add entries to the fortune(6) database.
OPTIONS
- Print a usage summary
-cx Use character x as the delimiter.
-s Do not summarize processing at the end of the run
-v Summarize processing at the end of the run (default).
datafile If you do not supply a name for the datafile, output will be writtn on inputfile.dat.
EXAMPLES
To convert a file called scene, which consists of lines like %% Hofstadter’s Law: It always takes longer than you expect, even when you take Hofstadter’s Law into account. %% "It is bad luck to be superstitious." -- Andrew W. Mathis %% If A = B and B = C, then A = C, except where void or prohibited by law. -- Roy Santoro use the following command. % strfile scene "scene" converted to "scene.dat" There were 1168 strings Longest string: 1156 bytes Shortest string: 0 bytes %
FILES
strfile.h header file