Finally the command that prompted the creation of in the first place: uniq.

Before implementing the command, I had to find out which options the default Linux implementations provided.

I used these pages as guideline:

The resulting command filters unique lines from stdin (or a piped input file) to stdout, and supports these options:

uniq [parameters]

displays unique lines in sorted file

-u      unique lines only
-d      repeated lines only
-c      display line count
-i      ignore case
-f      [ignore fields]         ignore number of fields
-s      [skip characters]       skip number of characters
-w      [compare characters]    compare number of characters
-in     [encoding]      input encoding
-ci     [culture]       culture info
-out    [encoding]      output encoding

uniq 0.10.4117.37457 (c) by 2011

Note that uniq only analyzes subsequent lines of text in the file. Thus it only operates correctly on a pre-sorted file. If the input is not sorted, equal lines may be output more than once (but not subsequently).

The first version of is available for download here, and contains the commands described in this post.

3 Responses to uniq

  1. […] and contains the commands listci, listenc, netenv, netver, datetime, df, enc, guid, tee, xslt, uniq. GA_googleAddAttr("AdOpt", "1"); GA_googleAddAttr("Origin", "other"); […]

  2. […] the uniq command of the command line utilities we can find all unique […]

  3. […] count the resulting IP addresses, I use my tool uniq, implemented after the Unix command […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: