mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-26 22:09:03 +02:00
i currently use the output of sha512sum in several places of xbmk, which is a bit unreliable in case output changes. other cases where i use util outputs in variables are probably reliable, because i'm using mostly posix utilities in those. to mitigate this, i now import suckless sbase, which has a reasonable sha512sum implementation. *every* binary it builds is being placed in build.list, because i'll probably start using more of them. for example, i may start modifying the "date" implementation, adding the GNU-specific options that i need as mentioned on init.sh i'm importing it in util/ because the sha512sum util is needed for verifying project sources, so if sbase itself is a "project source", that means we can into a chicken and egg bootstrapping problem. this is sbase at revision: 055cc1ae1b3a13c3d8f25af0a4a3316590efcd48 Signed-off-by: Leah Rowe <leah@libreboot.org>
46 lines
775 B
Groff
46 lines
775 B
Groff
.Dd October 8, 2015
|
|
.Dt UNIQ 1
|
|
.Os sbase
|
|
.Sh NAME
|
|
.Nm uniq
|
|
.Nd report or filter out repeated lines in a file
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl c
|
|
.Op Fl d | u
|
|
.Op Fl f Ar num
|
|
.Op Fl s Ar num
|
|
.Op Ar input Op Ar output
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
reads the
|
|
.Ar input
|
|
file and writes one copy of a line from each group of consecutive
|
|
duplicate lines to the
|
|
.Ar output
|
|
file.
|
|
If no
|
|
.Ar input
|
|
file is given
|
|
.Nm
|
|
reads from stdin.
|
|
If no
|
|
.Ar output
|
|
file is given
|
|
.Nm
|
|
writes to stdout.
|
|
.Sh OPTIONS
|
|
.Bl -tag -width Ds
|
|
.It Fl c
|
|
Prefix each line with the number of consecutive occurrences in
|
|
.Ar input .
|
|
.It Fl d | Fl u
|
|
Print duplicate | unique lines only.
|
|
.It Fl f Ar num | Fl s Ar num
|
|
Ignore the first
|
|
.Ar num
|
|
fields | characters in each input line when doing comparisons.
|
|
.El
|
|
.Sh STANDARDS
|
|
POSIX.1-2013.
|