UNIQ(1) BSD Reference Manual UNIQ(1) NNAAMMEE uunniiqq - report or filter out repeated lines in a file SSYYNNOOPPSSIISS uunniiqq [--cc | --dd | --uu] [--ff _f_i_e_l_d_s] [--ss _c_h_a_r_s] [_i_n_p_u_t___f_i_l_e [_o_u_t_p_u_t___f_i_l_e]] DDEESSCCRRIIPPTTIIOONN The uunniiqq 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. The following options are available: --cc Precede each output line with the count of the number of times the line occurred in the input, followed by a single space. --dd Don't output lines that are not repeated in the input. --ff _f_i_e_l_d_s Ignore the first _f_i_e_l_d_s 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. --ss _c_h_a_r_s Ignore the first _c_h_a_r_s characters in each input line when doing comparisons. If specified in conjunction with the --ff option, the first _c_h_a_r_s characters after the first _f_i_e_l_d_s fields will be ig- nored. Character numbers are one based, i.e. the first character is character one. --uu Don't output lines that are repeated in the input. If additional arguments are specified on the command line, the first such argument is used as the name of an input file, the second is used as the name of an output file. The uunniiqq utility exits 0 on success, and >0 if an error occurs. CCOOMMPPAATTIIBBIILLIITTYY The historic ++_n_u_m_b_e_r and --_n_u_m_b_e_r options have been deprecated but are still supported in this implementation. SSEEEE AALLSSOO sort(1) SSTTAANNDDAARRDDSS The uunniiqq utility is expected to be IEEE Std1003.2 (``POSIX'') compatible. 4.4BSD June 6, 1993 1