From unknown Tue Aug 19 09:34:44 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#61248 <61248@debbugs.gnu.org> To: bug#61248 <61248@debbugs.gnu.org> Subject: Status: uniq --unique needs examples Reply-To: bug#61248 <61248@debbugs.gnu.org> Date: Tue, 19 Aug 2025 16:34:44 +0000 retitle 61248 uniq --unique needs examples reassign 61248 coreutils submitter 61248 Dan Jacobson severity 61248 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 02:13:12 2023 Received: (at submit) by debbugs.gnu.org; 3 Feb 2023 07:13:12 +0000 Received: from localhost ([127.0.0.1]:36377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNqG0-0005WC-HU for submit@debbugs.gnu.org; Fri, 03 Feb 2023 02:13:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:37588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNqFy-0005W3-F7 for submit@debbugs.gnu.org; Fri, 03 Feb 2023 02:13:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNqFy-0001PZ-8M for bug-coreutils@gnu.org; Fri, 03 Feb 2023 02:13:10 -0500 Received: from cornsilk.ash.relay.mailchannels.net ([23.83.222.40]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNqFw-00013w-40 for bug-coreutils@gnu.org; Fri, 03 Feb 2023 02:13:09 -0500 X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A1A4641A8B for ; Fri, 3 Feb 2023 07:13:01 +0000 (UTC) Received: from pdx1-sub0-mail-a254.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 3B01E41A3A for ; Fri, 3 Feb 2023 07:13:01 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1675408381; a=rsa-sha256; cv=none; b=cLtXM0gbIVRyWpdGjwcEhnGgyCxa0/Qs+UHqLyJwspjH3c3yFEwPp/b0Xluum6CphfsXC8 Zz26j33bpShj1xNeNVg/7yE5Ouk5rS7Hw3lWPp77uoruNDMxm/ws3cwZYBruo6Gtd9wL1s wFAEWDvSwb3Inva77fMeX2JsLdO6GEYpAhvZ9HoAuRKQ91qKqbQK2RLkFCviC4lcKYLW4d QQpN0h2U9gN4b5vY8R0copFK0q3OiDNyD0dLwwhorm2s2RNMgTSUs0PX8XX1mW/ABFcE8B Zmn7Vz1Bf0BNpEMa5SU50J3oY4ODkbkmROZhXN+yIuSsXhHlNGdUzd5JOvorAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1675408381; 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:dkim-signature; bh=ZPL3Ka+GZwWoJ0Ms6mAYkW7qg+bxbCgclvupx8fgKUU=; b=ZEsYZy3f5XnDfmfhk7oU3n86BUQqGVRKBq84guITADQ2Wcky/WVMF5S/UBJWLZfM1rIoh0 P54bGvgNoDU4T9ADK9iMfPnALUzw2qdVzx26wXQ6fkJGj1lwhcHBEeL7Vo8c6vcvgSNeT5 H52zr/ne4JNVN8qVsFkViTxH8fHZFhibAQk76dT9MiQQR1fZIrV/GNetU7PxWQVDZpBaRX O1URwz4nU+dXB2/7fPZOlvYA3joQEJNqWzUv9L3JycrtR4hraz746knfKXyU4EUxB0963e 45Yc1wOZoMmDVp49kLIQrMi0yiIBA6/7SDsDVqqKEACwol0yKkSPRuD6foc2AQ== ARC-Authentication-Results: i=1; rspamd-5fb8f68d88-x4r5r; auth=pass smtp.auth=dreamhost smtp.mailfrom=jidanni@jidanni.org X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Lettuce-Trail: 45e07d516f744711_1675408381454_63515656 X-MC-Loop-Signature: 1675408381454:867288626 X-MC-Ingress-Time: 1675408381454 Received: from pdx1-sub0-mail-a254.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.123.200.117 (trex/6.7.1); Fri, 03 Feb 2023 07:13:01 +0000 Received: from jidanni.org (1-165-129-108.dynamic-ip.hinet.net [1.165.129.108]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a254.dreamhost.com (Postfix) with ESMTPSA id 4P7Rgw74XTz7k for ; Thu, 2 Feb 2023 23:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jidanni.org; s=dreamhost; t=1675408381; bh=ZPL3Ka+GZwWoJ0Ms6mAYkW7qg+bxbCgclvupx8fgKUU=; h=From:To:Subject:Date:Content-Type:Content-Transfer-Encoding; b=NNqHBBiaNje1qPof26sgugzP3nIPeiP8xpSusz7VgP54cigF6xc8uIlt7cKxP1wO8 +sqbMGq1GR/pKxjw4WehZ8nOszCFuVMJ+Hzzd5oXUANJA/1Y2qYjw7w4bMM1uzwQI2 XDOQXH0Nj2HbHfYbqhd4gXkRziX932mwq5FAcHzFPMvpWrxWfsJTnopOWZv//usp64 weoxhvVv+505sGPv6A3q3lIhWDF50yPYNs8xw2zziqFko1Zk/OXCcor+GS6pPslf3o UEA/ITK3CDChLl5SX5t64RkZFsFS2+EUdgGA/Dss/DHuKsJj6YnmRdXAMT55AFWLzX q7Qbr5XmGL34A== From: Dan Jacobson To: bug-coreutils@gnu.org Subject: uniq --unique needs examples Date: Fri, 03 Feb 2023 15:12:58 +0800 Message-ID: <875ycjnrwl.7.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=23.83.222.40; envelope-from=jidanni@jidanni.org; helo=cornsilk.ash.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) uniq INFO page says: ‘-u’ ‘--unique’ Discard the last line that would be output for a repeated input group. When used by itself, this option causes ‘uniq’ to print unique lines, and nothing else. This really needs some examples, to help people understand what it means. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 10 17:20:20 2023 Received: (at 61248) by debbugs.gnu.org; 10 Feb 2023 22:20:20 +0000 Received: from localhost ([127.0.0.1]:38246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQbki-0001Tc-5t for submit@debbugs.gnu.org; Fri, 10 Feb 2023 17:20:20 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:43979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQbkf-0001TI-Je for 61248@debbugs.gnu.org; Fri, 10 Feb 2023 17:20:18 -0500 Received: from [192.168.101.10] ([93.218.111.143]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MQ8OG-1pDMDS3QbA-00M5PS; Fri, 10 Feb 2023 23:20:02 +0100 Message-ID: <38b11813-37cd-79af-8ea8-0c349bad4e45@bernhard-voelker.de> Date: Fri, 10 Feb 2023 23:20:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: bug#61248: uniq --unique needs examples Content-Language: en-US To: Dan Jacobson , 61248@debbugs.gnu.org References: <875ycjnrwl.7.fsf@jidanni.org> From: Bernhard Voelker In-Reply-To: <875ycjnrwl.7.fsf@jidanni.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:blzz6QvVjRgLYNETUbSuA1myRDcgnMkr8UrCF0keCKepTRSlRy5 HMG38DVJ1slyGvbdTMr356MK504NZhE65BgiLGL3kU2H7hLKgDbFT/UP+8aHVfPhJXT72Ud /+sVPFjeint/dAT63GjNjjJhFsvO7IsTk0PpdodJ9lK1MKzJbbkkt5tBLnoLdqemqILmgI2 RVNMZ0/hi8hK782InDJ8g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:Y/yg0jpDrsM=;eUxz7hTFLBkCHzJ5R9oEm8dVbq0 VlHfYdaQWJwLui0gWuylu4mwN9BjxaChCXVay4/Sy3jDLwp8B+Uy2d9jELRpKdrfQusCX4jw1 7oRBO0C8lSTQY5kgT2C/jTvc9Ox9GRDd/fQmh8gfgBmYlwpyr/GiJcl6m2WARcLIqPSgCFxbU hWN9ZV4SSuEy72aMb4o5/0FMFgGcw9LfeeqvwW68qREVcCFslV2R64qx2Dyn35dpB0OX5ofG4 EHr0InisH4dfo4AX/ErZ4eMDt55cqIrwzPhugS/N58bYn5hZvI3a+l2tOGcb1x8nPTsi0iqCH 7r0RD9C+lwkJT/2gzIrE3PN4FJ5wy54Jl9taOcU4kmI2FwUz0g/Nu64jLSGGNtFoct5b+3J4R 3o82bjtQMZ+VcuhxUb6aRsNVtt6Re3VkDP0C4KHUypgLU++6St3/WYcjKZi6cWBFaLuXcLcJA bWaLnRDLit6GK/1FlpN1pe/RC4dq/Lu120va7rL/p9/GER5sq4GyIw13DaUhxDGtWuo9pMDv5 vALJQn0MhMTkVEgeLdiR+OLfv7p4+fGjLBJYDMJVE9modb0WkkITj6lhtWrktDtCGkOmvEEKi HDnxw6cJBJScPgAKY7jj5htjWjUVQ4DAF02nizqG4TGKtXiQYaFoT2HQGHYmDrub6NoVAW0fD 1woriFhhsSpnCGEvrd7FtO5IOYSVSZkRdmYDXOrH8g== X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 61248 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2/3/23 08:12, Dan Jacobson wrote: > uniq INFO page says: > ‘-u’ > ‘--unique’ > Discard the last line that would be output for a repeated input > group. When used by itself, this option causes ‘uniq’ to print > unique lines, and nothing else. > > This really needs some examples, to help people understand what it means. While an example is always nice, isn't the last part of the above exactly telling what it's doing? $ printf '%s\n' a a a b c c | uniq -u b Admittedly, the --help output is both much shorter and clearer: -u, --unique only print unique lines Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 10 20:06:34 2023 Received: (at 61248) by debbugs.gnu.org; 11 Feb 2023 01:06:34 +0000 Received: from localhost ([127.0.0.1]:38372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQeLa-00067u-Hl for submit@debbugs.gnu.org; Fri, 10 Feb 2023 20:06:34 -0500 Received: from glass.ash.relay.mailchannels.net ([23.83.222.70]:43381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQeLU-00067V-7E for 61248@debbugs.gnu.org; Fri, 10 Feb 2023 20:06:33 -0500 X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 83F86140A00; Sat, 11 Feb 2023 01:06:19 +0000 (UTC) Received: from pdx1-sub0-mail-a302.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id F27C1140A0E; Sat, 11 Feb 2023 01:06:18 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1676077579; a=rsa-sha256; cv=none; b=OD3vnQXODvduJFd9j468cAb+N/8zRWTEjCRya/k+jp9v1hlS+X/OzOPLW8/CmCm7Ay0BPa hkeRYaxPpIu9l2ua5SQw96eDENkCCHyZWxybCaHnnwtRHDcw7TWeYAfLeGl4TqFfcY3mOm ntxyiTwpW8NRkWWcvL70hZECdvooOTJuInoeqUQVLZ/J+eKkWvY3KZ9fKGVp7rs3z1emtL cFLBquQ5KauOuXZi21FpzLtzPrd0gHHn5RrGTq4GXnmfiFVpGONOmIMUpG6H4IKe1jt6Gd Rq8A3sSx51nwH88Ytt5Bdy37yECH4XVNCYAt8KcCmQ3TDrfOZ3l/ujL94QUDcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1676077579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references:dkim-signature; bh=wKvyajyg2Mfq4rz7se7aEyJLLgJPhwJSg1Ygse5Cy3E=; b=k6hRIgu/MYBYpMEHoGi3QNrTitltyLOt8z++ZOVMR+ozc0bNS5KbN/5v4FPr7tYqn9nHdd qGafAhFZqZffF9xvFF3YoC2jeMnOhfZoPjWUNVJKuH9NDXT+64TNIrIuFrRG5mD15S1clw P8ESmbkQt6pl8PNC7CR7NyPJlUVQLColwf0j5o4u7Mn97zhpfriAYZ8lmYb+NL8nrRHaUa xzvX6f3P67XSryf3050fko5k3tYCZNgtYv6ICZHFXpx9GqQEgc5S2Q7jsv4ZqYKkvjKx3P BL8KENBCtW3K3hqqf4pubgS98oB1esnt5I2W8vTtiK2PU+bLwhD/cOh7igqDJg== ARC-Authentication-Results: i=1; rspamd-b9c55767f-8lq94; auth=pass smtp.auth=dreamhost smtp.mailfrom=jidanni@jidanni.org X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Grain-Eyes: 126ae8e76f9a4119_1676077579331_3635295422 X-MC-Loop-Signature: 1676077579330:262494600 X-MC-Ingress-Time: 1676077579330 Received: from pdx1-sub0-mail-a302.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.107.134.100 (trex/6.7.1); Sat, 11 Feb 2023 01:06:19 +0000 Received: from jidanni.org (1-165-212-11.dynamic-ip.hinet.net [1.165.212.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a302.dreamhost.com (Postfix) with ESMTPSA id 4PDC964fSfz1G; Fri, 10 Feb 2023 17:06:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jidanni.org; s=dreamhost; t=1676077578; bh=wKvyajyg2Mfq4rz7se7aEyJLLgJPhwJSg1Ygse5Cy3E=; h=From:To:Cc:Subject:Date:Content-Type; b=WMAb1KGu3eTwC0Z+xcZae3SEDKGnyk/7jzwDetv8WN3X14FRHAenzUMyH6uVYgdik 1DIJj36+uJ6CQ6EsE9gw4IYH6Ocr/SkcZ73Ito01OgR8HIVkTML3PLVfcD3DDfHeBA V8mV4YNGGnmDImrvvaG9WDFiHF5Sy1XxD/i36BAbef1a6i/a1fIfnz8vU9NUFHpASY i7ZDlpg/YC/WWbhUDDXM4ia4swwy0WSqGtCEkZNw+o2b+t6nDlwtV6ImpbDnnloVxn fZpzUlZgCHrO/7eppKwwHFznJqIx5EaZFFp1AhCfpuTsldIpnNa8E+NQqLhROOJVMZ KJZNnK+EzAwhg== From: Dan Jacobson To: Bernhard Voelker Subject: Re: bug#61248: uniq --unique needs examples References: <875ycjnrwl.7.fsf@jidanni.org> <38b11813-37cd-79af-8ea8-0c349bad4e45@bernhard-voelker.de> Date: Sat, 11 Feb 2023 09:06:15 +0800 Message-ID: <87o7q1f1tk.5.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61248 Cc: 61248@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) BV> While an example is always nice, isn't the last part of the above BV> exactly telling what it's doing? That is for experts to know. The rest of us need examples, sort of like your idea, (please modify): $ echo a a a b c c b b d b | xargs --max-args=1 | uniq --unique b d b