The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<html><head><title>uniq</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
</head>
<body class='pod'>
<!--
  generated by Pod::Simple::HTML v3.01,
  using Pod::Simple::PullParser v2.02,
  under Perl v5.008002 at Thu Aug  5 13:56:15 2004 GMT.

 If you want to change this HTML document, you probably shouldn't do that
   by changing it directly.  Instead, see about changing the calling options
   to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
   then reconverting this document from the Pod source.
   When in doubt, email the author of Pod::Simple::HTML for advice.
   See 'perldoc Pod::Simple::HTML' for more info.

-->

<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>

<p>uniq - report or filter out repeated lines in a file</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>

<p>uniq [<b>-c</b> | <b>-d</b> | <b>-u</b>] [<b>-f</b> <i>fields</i>] [<b>-s</b> <i>chars</i>] [<i>input files</i>]</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>The uniq utility reads the standard input comparing adjacent lines and writes a copy of each unique input line to the standard output.
The sec- ond and succeeding copies of identical adjacent input lines are not writ- ten.
Repeated lines in the input will not be detected if they are not adjacent,
so it may be necessary to sort the files first.</p>

<p>The following options are available:</p>

<dl>
<dt><a name="c"
>c</a></dt><p class="pad"></p>

<dd>Precede each output line with the count of the number of times the line occurred in the input,
followed by a single space.</dd><p class="pad"></p>

<dd>= item d</dd><p class="pad"></p>

<dd>Don&#39;t output lines that are not repeated in the input.</dd><p class="pad"></p>

<dt><a name="f_fields"
>f <i>fields</i></a></dt><p class="pad"></p>

<dd>Ignore the first fields in each input line when doing compar- isons.
A field is a string of non-blank characters separated from adjacent fields by blanks.
Field numbers are one based,
i.e.
the first field is field one.</dd><p class="pad"></p>

<dt><a name="s_chars"
>s <i>chars</i></a></dt><p class="pad"></p>

<dd>Ignore the first chars characters in each input line when doing comparisons.
If specified in conjunction with the <b>-f</b> option,
the first chars characters after the first fields fields will be ig- nored.
Character numbers are one based,
i.e.
the first character is character one.</dd><p class="pad"></p>

<dt><a name="u"
>u</a></dt><p class="pad"></p>

<dd>Don&#39;t output lines that are repeated in the input.</dd><p class="pad"></p>
</dl>

<p>If additional arguments are specified on the command line,
they are used as the names of input files.</p>

<p>The uniq utility exits 0 on success or &#62;0 if an error occurred.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="COMPATIBILITY"
>COMPATIBILITY</a></h1>

<p>The historic <b>-</b><i>number</i> and <b>+</b><i>number</i> options are supported as synonyms for <b>-f</b> <i>fields</i> and <b>-s</b> <i>chars</i>,
respectively.</p>

<p>This version accepts 0 as a valid argument for the <b>-f</b> and <b>-s</b> switches; some implementations of uniq do not.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SEE_ALSO"
>SEE ALSO</a></h1>

<p>sort(1)</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="BUGS"
>BUGS</a></h1>

<p><i>uniq</i> has no known bugs.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="AUTHOR"
>AUTHOR</a></h1>

<p>The Perl implementation of <i>uniq</i> was written by Jonathan Feinberg,
<i>jdf@pobox.com</i>.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="COPYRIGHT_and_LICENSE"
>COPYRIGHT and LICENSE</a></h1>

<p>This program is copyright (c) Jonathan Feinberg 1999.</p>

<p>This program is free and open software.
You may use,
modify,
distribute,
and sell this program (and any modified variants) in any way you wish,
provided you do not restrict others from doing the same.</p>

<!-- end doc -->

</body></html>