Jesus 'n Jim
A mainly PC (some Mac) site w/Software, Computer Repair Info, How-To's on Using Computers
Technical Support 1-360-521-2060 (my business line cell)

uniq - print unique lines (C++)


*NIX-style text filter to output unique text lines. windows, dos version of a familiar *NIX utility with more interesting options. used in a fashion similar to windows' command-line program sort.exe.

available with source and executeables as a single archive file. It is under the GPL3 license. lsm file.

Download Now (version 1.3, Sep 27, 2010)

09/27/2010  02:16 AM           181,857

5a82538f4b53dcb9 166c184a1d2575c5 84972ef9c7298191 190e2693f8ad3b8b
11d5ac8a4413ee10 e9fa78b09f82c8e7 ab87b7b2f00925f8 7ebca595841036ea


DOS 32-bit, windows 32 and 64-bit versions are included. should be Vista/7 compatible. program compiles with mingw, borland c++, and djgpp.

And if uniq's on UNIX or you have UNIX tools installed on your computer, you probably won't want to call it uniq.exe. rename it uniq1 or something like that. (UNIX machines of course do not use a .exe extension)

This was compiled with Borland C++ 5.5.1 and djgpp and requires at least 128K memory. since it is STL, it could possibly be a memory hog on large text files, since everything is processed in RAM. The DOS version may start using virtual Memory at some point if it can find a C: drive.

C:\prj\uniq\uniq-1.2\dos>uniq -?
uniq - print unique lines from standard input.
Usage: uniq [-?] [-h[elp]] [-v[ersion]]
       uniq [-cu] [-cr] [-u]
-cu count the unique lines
-cr count the repeated lines
-p pre-sorts before unique is performed. works on -u and -cu.
-u print only unique lines (default)
-? or -h or -help gives this help and exits.
-v or -version gives the version number and exits.
options are mutually exclusive except for -s.
EXAMPLE: uniq -cr < filein > fileout
EXAMPLE: uniq -cu < filein > fileout
EXAMPLE: type filein | uniq > fileout
Copyright 1992,2008,2009 Jim Michaels. under GPL3 license.