    LOG-COPY:  Copy part of a log file to a new log file.

    Log-copy copies certain records from an existing log file to a new log
    file.  This is useful for decimating log files or repairing log files
    with junk at the end, such as could arise if a program crashes in the
    middle of writing a record.

    Usage:

       log-copy [ -ignoredtype... ] logfile-in range logfile-out [ low[%mod] ]

    Records with negative indexes or with indexes in the indicated range
    are copied from logfile-in to a newly-created logfile-out, except that
    records with the types given in the optional first argument are
    ignored.  (See log-types.doc for a listing of conventionally-used
    record types.).  The range has the usual [low][:[high]][%modulus]
    form, as described in parse_range in misc.c.  If high and the colon
    are omitted, high defaults to low.  If high is omitted but the colon
    is present, the range extends to the end of the file.

    If the optional trailing argument is present, the indexes of the
    records written (other than those with negative indexes) are changed
    so that the first record has index 'low' and subsequent indexes
    increase by 'mod'.  The default for 'mod' is the modulus in the input
    range.

    As a special fudge, an input file range of "-" causes only records
    with negative indexes to be copied.

                Copyright (c) 1995-2003 by Radford M. Neal