From nobody Thu Dec 14 15:23:00 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrbhP4Bfrz545pJ for ; Thu, 14 Dec 2023 15:23:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SrbhP2bXsz3NBR for ; Thu, 14 Dec 2023 15:23:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702567381; a=rsa-sha256; cv=none; b=Li3RhFugqYcd9QGkZKMPfsFvgydSIGQ9r31r/S50hL+4OmopLkwzwm/YzjvMo53e0gPkuv LG61rgeQMyHJjGPpfgfk3msJCURXRmlV442bTpID4wGEIaAC7gFsk3WSVL+AjUOC6BxSt1 wmacs4xIeZAeKvTK0gQBMEOoqzOjRZ+oKmNlnmFlJVixzssn8GEB6MFNXokR8FQOMcL2el T84m/OnnwfKRhWBEIcMJjwkHWE+LN8wdxMkpHr6Ydh4pm/lwCVXb8/8BbVmkCqxBAjft5d 8s1pTYgAaqYIyfB8gOBKVJ1XpLWPKffEyt//cIUuX6wtoD5umszaX5jEvTPlNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702567381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g9iyGfUcxIbV0sHuyskyI8vwiMX4eaMeEcLsTbn+T28=; b=aTeeACVLkYOWUvW6UPrmIJLB5WOGELI5LY5Ifjr9l1RIYX0j8ssZzm2eY5OeAFURVkO6tp BD7mL6pTvKpqpcK55avldPPXg9Cxpd9xSH6456TimatB1MxpBjw89TE8yVyI1ayptaJUmQ qOZx/r49hotgpdv1z145W70bxDGKh1iVfeUXkaLFpdj6+NRtuqXyvLbnvGzsKhHhWE62YO 5AYnFZ4v47Xo2oQP8e287aZSwCxBcogqT04Lb793jmnaUo+wg+M9fLcqwcMwavcPLHRVgw Qy8H/v9baor1lAPU0gjpT8uPefhAdC3rE+u4W6i1vXPuyZpZo4AllZT6mONbYw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrbhP1gjdzYJv for ; Thu, 14 Dec 2023 15:23:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3BEFN1L3008684 for ; Thu, 14 Dec 2023 15:23:01 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3BEFN1Qo008683 for bugs@FreeBSD.org; Thu, 14 Dec 2023 15:23:01 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 275764] `uniq -D -c` gives wrong values of repeat counts Date: Thu, 14 Dec 2023 15:23:00 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: s110062131@m110.nthu.edu.tw X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275764 Bug ID: 275764 Summary: `uniq -D -c` gives wrong values of repeat counts Product: Base System Version: 13.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: s110062131@m110.nthu.edu.tw CC: lwhsu@FreeBSD.org ## Environment: * FreeBSD 13.2-RELEASE * RPi 400 (bootloader 8ba17717 2023/01/11) * GENET version 5.0 phy 0x0000 ## Bug description: ```$ uniq -D -c``` gives wrong values of repeat counts. ## Steps to reproduce: 1. Assuming a file named animals.txt with the following content: alligator bear bear camel camel camel dolphin elephant bear fish fish bird lion koala koala koala 2. The following command should print all duplicated lines and repeat count= s: ``` $ uniq -D -c animals.txt ``` ## Actual result: ``` $ uniq -D -c animals.txt 1 bear 1 bear 1 camel 1 camel 2 camel 1 fish 1 fish 1 koala 1 koala ``` As you can tell, repeat counts are wrong. ## Expected result: ``` $ uniq -D -c animals.txt 1 bear 2 bear 1 camel 2 camel 3 camel 1 fish 2 fish 1 koala 2 koala ``` In fact, we actually tested it out on Linux as well.=20 ``` (Linux) $ uniq -D -c animals.txt uniq: printing all duplicated lines and repeat counts is meaningless Try 'uniq --help' for more information. ``` We think it might be another acceptable way to handle this bug. --=20 You are receiving this mail because: You are the assignee for the bug.=