summain(1)

NAME
summain - generic checksum program interface

SYNTAX
summain [ -cgfFiIbB ] [ file ... ]

DESCRIPTION
summain is a generic interface for programs which compute checksums. There is no actual summain program. Instead, several other programs, such as cksum and fingerprint, all conform to the summain interface. summain computes checksums for some number of files. Normally it takes the filenames as arguments, opens the files in binary mode, computes their checksums, and prints the checksums (with filenames) on standard output. A checksum never contains the characters tab, space, newline, or null. Other features of a checksum depend on the particular program. summain follows the getopt standard. Its options are summarized here.

-b  Open files in binary mode (default).

-B  Open files in text mode.

-i  Read filenames from input, and ignore any filename arguments.

-I  Use arguments as filenames (default). If no arguments are given, summain reads the standard input as a file. Otherwise it ignores the input.

-f  When the -i option is in effect, read input lines with the same format as the usual output of summain. In other words, look for the first tab on each input line, and use the filename following that tab.

-F  When the -i option is in effect, read filenames as entire input lines (default).

-g  Generate checksums (default). summain will print each checksum, followed by a tab and the name of the file, as a separate line on standard output. The checksum of the standard input is printed with a tab but no filename.

-c  Check checksums. This option forces -fi. summain will read any number of input lines, each containing a purported checksum, a tab, and a filename. summain will open each file, compute its checksum, and compare the checksum to the purported checksum.

EXIT VALUE
0 normally. 1 for usage messages. 2 if a file could not be opened for reading. 3 with option -c if any checksums failed to match. (Exit value 3 overrides exit value 2.)

BUGS
None known.

VERSION
summain version 0.9, 13 July 1993.

AUTHOR
Placed into the public domain by Daniel J. Bernstein.

SEE ALSO
cksum(1), fingerprint(1), md5(1), snefru(1)