/
uu.1
60 lines (52 loc) · 1006 Bytes
/
uu.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.Dd May 11, 2017
.Dt UU 1
.Os
.Sh NAME
.Nm uu ,
.Nm fnuu ,
.Nm bauu ,
.Nd unsorted uniq
.Sh SYNOPSIS
.Nm uu
.Nm fnuu
.Nm bauu
.Sh DESCRIPTION
.Nm uu
reads stdin and prints only the first occurrence of each input line.
The input does not have to be sorted. Any arguments are ignored.
.Pp
.Nm fnuu
is a faster, less memory intensive version of uu with with false negatives
(lines that haven't been in the input have a slim chance not to be printed).
.Pp
.Nm bauu
has the false negatives of fnuu, but uses constant memory (512 MB) and is
at least twice as fast as the other two versions.
.Sh EXAMPLES
Remove duplicate, non-adjacent lines (works with
.Nm fnuu
and
.Nm bauu
as well):
.Pp
.Dl $ printf 'naaas\enpaas\enras\enpaas\entaas' | uu
.Dl naaas
.Dl paas
.Dl ras
.Dl taas
.Sh EXIT STATUS
.Ex -std
.Sh BUGS
.Nm uu
uses too much memory.
.Pp
.Nm fnuu
and
.Nm bauu
have too many false negatives.
.Sh SEE ALSO
.Xr awk 1
.Xr echo 1 ,
.Xr uniq 1 .
.Sh AUTHORS
.An pranomostro Aq Mt pranomostro@posteo.net