home *** CD-ROM | disk | FTP | other *** search
- UNEEK - Eliminate Duplicate Records
- Version: 1.0.1 Date: June 18, 1990
- Author: Don A. Williams
-
- **************************** NOTICE! **************************
- * Contrary to the current trend in MS-DOS software this *
- * program, for whatever it is worth, is NOT copyrighted *
- * (with the exception of the runtime library from Borland *
- * International's Turbo C)! The program, in whole or in *
- * part, may be used freely in any fashion or environment *
- * desired. If you find this program to be useful to you, *
- * do NOT send any contribution to the author; in the words *
- * of Rick Conn, 'Enjoy!' However, if you make any *
- * improvements, I would enjoy receiving a copy of the *
- * modified source. I can be reached, usually within 24 *
- * hours, by messages on any of the Phoenix systems, *
- * particularly: *
- * *
- * Bob's Answering Machine [OPUS] *
- * (602) 242-3158 1200/2400 bps *
- * Radioactive West [PCBOARD] *
- * (602) 873-0810 1200/2400 bps *
- * The Tool Shop BBS [PCBOARD] *
- * (602) 279-2673 1200/2400/9600 bps *
- * (Good luck trying! VERY BUSY!) *
- * Technoids Anonymous [PCBOARD] *
- * (602) 899-4876 300/1200/2400 bps *
- * *
- * All can be reached through PC Pursuit. *
- * *
- * or: *
- * on GEnie, mail address: DON-WILL *
- * on CompuServ: 75410,543 *
- * *
- * Every effort has been made to avoid error and moderately *
- * extensive testing has been performed on this program, *
- * however, the author does not warrant it to be fit for any *
- * purpose or to be free from error and disclaims any *
- * liability for actual or any other damage arising from the *
- * use of this program. *
- *****************************************************************
-
-
- UNEEK is a program that is functionally quite similar to the
- "unique" command of Un*x, it reads through the input file and
- retains only the last of duplicate records. The major difference
- between UNEEK and unique is that unique uses the entire record
- for the determination of duplication and UNEEK can use
- user-specified fields. Unique is also a "filter", i.e. it reads
- from stdin and writes to stdout, and always requires I/O
- redirection where UNEEK, by default, reads from a user-specified
- input file and writes to an intermediate file. As with many
- MS-DOS programs, on termination, UNEEK will rename the original
- input file to a ".BAK" file and rename the output file to the
- original input file name.
-
-
- Usage:
-
-
- C:>uneek {- | input_file_name} [field_spec ... ]
-
-
- If the command line arguments contain a single, blank-delimited
- '-', UNEEK will operate as a "filter", reading input from stdin
- and writing output to stdout. Otherwise, an input file name must
- be specified. This file name is a standard DOS file name and may
- contain the full path.
-
- The field specifications are optional and, if none are supplied,
- UNEEK will use the entire line to determine duplication. The
- field specifications can be in either of two forms:
-
- bb:ll[:o] - where bb is the character position of the
- beginning of the field, ll is the length of the
- field in characters, and o is the optional field
- option. Currently, only 'i', for case
- insensitive matching, and 'c', for case sensitive
- matching, are supported as field options. If no
- field option is specified for a field, the
- matching on that field will be case insensitive.
-
- bb:ee[:o] - where bb is the character position of the
- beginning of the field as before, ee is the
- character position of the ending of the field,
- inclusive, and o is the optional field option as
- before.
-
- All character positions used by UNEEK are 1-relative, i.e. the
- first character of the record is character 1 not character 0.
- For example if you wanted to match on a field that occupied
- characters 21, 22, 23, 24, and 25, you would use a field
- specifier of 21:5 or 21-25 to describe it.
-
-
- Examples:
-
- To use UNEEK as a "filter" very similar to the Un*x "unique"
- command:
-
- C:>uneek - <input_file >output_file
-
- This would be a case insensitive match on the entire record to
- eliminate duplicates, retaining only the last of any duplicates.
-
-
- UNEEK can also be used as a "filter" with field specifications:
-
- C:>uneek - 21:5:c <input_file >output_file
-
- which would use a case sensitive match to eliminate records in
- which characters 21, 22, 23, 24, and 25 were the same.
-
-
- To use UNEEK not as a "filter":
-
- C:>uneek input_file
-
- which would use a case insensitive match on the entire record to
- eliminate duplicates from input_file, retaining only the last of
- any duplicates. The original input file, unmodified, would be
- renamed to input_file.BAK.
-
-