Page MenuHomeFreeBSD

D47999.id147731.diff
No OneTemporary

D47999.id147731.diff

diff --git a/usr.bin/uniq/tests/uniq_test.sh b/usr.bin/uniq/tests/uniq_test.sh
--- a/usr.bin/uniq/tests/uniq_test.sh
+++ b/usr.bin/uniq/tests/uniq_test.sh
@@ -53,7 +53,12 @@
count_repeated_body() {
printf "a\na\nb\nb\na\n" >input
printf " 2 a\n 2 b\n" >expected
+ atf_check_uniq -cd
+ atf_check_uniq -c -d
+ atf_check_uniq -dc
+ atf_check_uniq -d -c
atf_check_uniq --count --repeated
+ atf_check_uniq --repeated --count
}
atf_test_case all_repeated
@@ -64,7 +69,15 @@
printf "a\na\nb\na\na\n" >input
printf "a\na\na\na\n" >expected
atf_check_uniq -D
+ atf_check_uniq -Dnone
atf_check_uniq --all-repeated
+ atf_check_uniq --all-repeated=none
+ printf "\na\na\n\na\na\n" >expected
+ atf_check_uniq -Dprepend
+ atf_check_uniq --all-repeated=prepend
+ printf "a\na\n\na\na\n" >expected
+ atf_check_uniq -Dseparate
+ atf_check_uniq --all-repeated=separate
}
atf_test_case skip_fields
diff --git a/usr.bin/uniq/uniq.1 b/usr.bin/uniq/uniq.1
--- a/usr.bin/uniq/uniq.1
+++ b/usr.bin/uniq/uniq.1
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 12, 2024
+.Dd December 9, 2024
.Dt UNIQ 1
.Os
.Sh NAME
@@ -36,8 +36,8 @@
.Nd report or filter out repeated lines in a file
.Sh SYNOPSIS
.Nm
-.Op Fl c | Fl d | Fl D | Fl u
-.Op Fl i
+.Op Fl cdiu
+.Op Fl D Ns Op Ar septype
.Op Fl f Ar num
.Op Fl s Ar chars
.Oo
diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c
--- a/usr.bin/uniq/uniq.c
+++ b/usr.bin/uniq/uniq.c
@@ -366,7 +366,7 @@
static void
usage(void)
{
- (void)fprintf(stderr,
-"usage: uniq [-c | -d | -D | -u] [-i] [-f fields] [-s chars] [input [output]]\n");
+ (void)fprintf(stderr, "usage: uniq [-cdiu] [-D[septype]] "
+ "[-f fields] [-s chars] [input [output]]\n");
exit(1);
}

File Metadata

Mime Type
text/plain
Expires
Thu, May 1, 1:14 PM (15 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17882230
Default Alt Text
D47999.id147731.diff (1 KB)

Event Timeline