X-Loop: help-debbugs@HIDDEN Subject: bug#5832: Feature request: uniq -k Resent-From: Raphael Clifford <drraph@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-To: owner <at> debbugs.gnu.org Resent-CC: bug-coreutils@HIDDEN Resent-Date: Sat, 03 Apr 2010 18:50:03 +0000 Resent-Message-ID: <handler.5832.B.127032055115955 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 5832 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 5832 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.127032055115955 (code B ref -1); Sat, 03 Apr 2010 18:50:03 +0000 Received: (at submit) by debbugs.gnu.org; 3 Apr 2010 18:49:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Ny8P7-00049I-Ub for submit <at> debbugs.gnu.org; Sat, 03 Apr 2010 14:49:10 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <drraph@HIDDEN>) id 1Ny8Ff-00044v-Fr for submit <at> debbugs.gnu.org; Sat, 03 Apr 2010 14:39:24 -0400 Received: from lists.gnu.org ([199.232.76.165]:39740) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from <drraph@HIDDEN>) id 1Ny8Fb-0006jK-48 for submit <at> debbugs.gnu.org; Sat, 03 Apr 2010 14:39:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ny8Fa-0000A0-FV for bug-coreutils@HIDDEN; Sat, 03 Apr 2010 14:39:18 -0400 Received: from [140.186.70.92] (port=34469 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ny8FZ-00009l-38 for bug-coreutils@HIDDEN; Sat, 03 Apr 2010 14:39:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from <drraph@HIDDEN>) id 1Ny8FX-0007wC-Oh for bug-coreutils@HIDDEN; Sat, 03 Apr 2010 14:39:16 -0400 Received: from mail-fx0-f212.google.com ([209.85.220.212]:35201) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from <drraph@HIDDEN>) id 1Ny8FX-0007w8-Gu for bug-coreutils@HIDDEN; Sat, 03 Apr 2010 14:39:15 -0400 Received: by fxm4 with SMTP id 4so1201033fxm.26 for <bug-coreutils@HIDDEN>; Sat, 03 Apr 2010 11:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=jdSHKbdsEp8qtr1CB7H6mHBO0XGFlWNqpcLh7qIIais=; b=DeMSLDwW+kvOB4gZ1XL7z6hTt/9tKbWydbFewa23aKC3bXKqLuRKQ7+WsczBDwxGwg VmhJZ/2jNEUsY7JVK4eqru4UsSXxb0HvjmrjwyXCRENJKnUGi2X2JM+9ROc1svEurdfM pguQ/lOwAHKS2ndLXOHYI+tNyAr2cwY22Vm14= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=wXqKJNSp4+wJtvFbOa+vmUMMwAXbyLfBJ4U77Q5I8WvpLw4L9qGzQmQqGlJxMMbP3e vo3OlzOvOCiXOHfjxhvLnuqJkbcVK0VHR9OvFOLklqSXo6vKCpkVrRWAbCR3P2HWoaT0 jpfJNEx/J+oVulW/YMC74mnH28hm8fS3Ix2Mo= MIME-Version: 1.0 Received: by 10.239.179.133 with HTTP; Sat, 3 Apr 2010 11:39:14 -0700 (PDT) Date: Sat, 3 Apr 2010 19:39:14 +0100 Received: by 10.239.132.5 with SMTP id 5mr292592hbp.137.1270319954470; Sat, 03 Apr 2010 11:39:14 -0700 (PDT) Message-ID: <p2sa8f0e1a61004031139mc725d94kf74612a01fd6179b@HIDDEN> From: Raphael Clifford <drraph@HIDDEN> Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.3 (---) X-Mailman-Approved-At: Sat, 03 Apr 2010 14:49:08 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -4.6 (----) Please excuse the cross-post but I have been told this is the appropriate place to place a feature request. Is it possible to make a feature request for uniq to add the "-k" option to specify fields? Interestingly uniq already has such things as -f, --skip-fields=N avoid comparing the first N fields and -s, --skip-chars=N avoid comparing the first N characters but no explicit option to specify which fields should be considered when doing the comparison. This would be very useful, for example, when removing duplicates from time series data (where you are only worried about consecutive duplicates on certain fields). The awk equivalent would be something like awk '$2$3$4$5 != p; {p=$2$3$4$5}' for using fields 2 to 5 as comparators. Raphael P.S. http://www.opengroup.org/onlinepubs/9699919799/utilities/uniq.html is the posix specification for uniq if that is of any interest. Curiously it says nothing about which duplicate line to keep when you don't consider all fields in the comparison.
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Raphael Clifford <drraph@HIDDEN> Subject: bug#5832: Acknowledgement (Feature request: uniq -k) Message-ID: <handler.5832.B.127032055115955.ack <at> debbugs.gnu.org> References: <p2sa8f0e1a61004031139mc725d94kf74612a01fd6179b@HIDDEN> X-Gnu-PR-Message: ack 5832 X-Gnu-PR-Package: coreutils Reply-To: 5832 <at> debbugs.gnu.org Date: Sat, 03 Apr 2010 18:50:03 +0000 Thank you for filing a new bug report with GNU. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-coreutils@HIDDEN If you wish to submit further information on this problem, please send it to 5832 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 5832: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5832 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 3 Apr 2010 21:42:55 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 03 17:42:55 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1NyB7G-0007mv-Qf for submit <at> debbugs.gnu.org; Sat, 03 Apr 2010 17:42:54 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <bob@HIDDEN>) id 1NyB7F-0007mn-4M for control <at> debbugs.gnu.org; Sat, 03 Apr 2010 17:42:53 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.230.115]) by joseki.proulx.com (Postfix) with ESMTP id 9ABFB213FC for <control <at> debbugs.gnu.org>; Sat, 3 Apr 2010 15:42:48 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id 869653CC204; Sat, 3 Apr 2010 15:42:48 -0600 (MDT) To: control <at> debbugs.gnu.org Subject: additional tags Message-Id: <20100403214248.869653CC204@HIDDEN> Date: Sat, 3 Apr 2010 15:42:48 -0600 (MDT) From: bob@HIDDEN (Bob Proulx) X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -2.8 (--) severity 5832 wishlist thanks
X-Loop: help-debbugs@HIDDEN Subject: bug#5832: Feature request: uniq -k Resent-From: Steve Ward <planet36@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-To: owner <at> debbugs.gnu.org Resent-CC: bug-coreutils@HIDDEN Resent-Date: Sun, 04 Apr 2010 14:31:03 +0000 Resent-Message-ID: <handler.5832.B5832.127039142030373 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 5832 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Raphael Clifford <drraph@HIDDEN> Cc: 5832 <at> debbugs.gnu.org Received: via spool by 5832-submit <at> debbugs.gnu.org id=B5832.127039142030373 (code B ref 5832); Sun, 04 Apr 2010 14:31:03 +0000 Received: (at 5832) by debbugs.gnu.org; 4 Apr 2010 14:30:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1NyQqA-0007to-52 for submit <at> debbugs.gnu.org; Sun, 04 Apr 2010 10:30:18 -0400 Received: from mail-yw0-f201.google.com ([209.85.211.201]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <planet36@HIDDEN>) id 1NyHMN-0003BM-Ks for 5832 <at> debbugs.gnu.org; Sun, 04 Apr 2010 00:22:56 -0400 Received: by ywh39 with SMTP id 39so1971544ywh.21 for <5832 <at> debbugs.gnu.org>; Sat, 03 Apr 2010 21:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type; bh=jNShPMbTd2NrVZUn3Qhy/DWi9qC59Jzdnbn9XAb+X2U=; b=WzOSwas3P2Q71ZzwOtkuQCV3LxewfakpGmlGIjo17q9HLuMU8er+thQIZcxBJ9OUdH oRakyGiihgLesqebsiiTtvfUcNqo2YnWiFV7Pj1DXS4OPVBMt4lJb1Fthu+kmyT7i34d E6I6nj7jnWoXSEMLgR6ta9byTB5J3V6TlbIC0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=fGImOXYhuZVl8+nsHr1GRaV2Ivb29+wZFLzRYqG/ZATR9RupSiDL/ABwOlwSIKD02h NDlDIozeazTQaK8wR7n0ws0WpLrjIDUN0tWj4/MowWdf8XyHuVkHjR8fvjwiwU8ORSrF ZNuCjKUXwTEjfR/MN0YKMMAujn4/+VPWPh1hc= MIME-Version: 1.0 Received: by 10.150.200.7 with HTTP; Sat, 3 Apr 2010 21:22:31 -0700 (PDT) In-Reply-To: <p2sa8f0e1a61004031139mc725d94kf74612a01fd6179b@HIDDEN> References: <p2sa8f0e1a61004031139mc725d94kf74612a01fd6179b@HIDDEN> From: Steve Ward <planet36@HIDDEN> Date: Sun, 4 Apr 2010 00:22:31 -0400 Received: by 10.151.59.20 with SMTP id m20mr4641440ybk.82.1270354971417; Sat, 03 Apr 2010 21:22:51 -0700 (PDT) Message-ID: <h2yf5c1222c1004032122g79c24f53n1c93351c4b0aee2c@HIDDEN> Content-Type: multipart/alternative; boundary=001517510fc8cf65a404836190b9 X-Spam-Score: -2.6 (--) X-Mailman-Approved-At: Sun, 04 Apr 2010 10:30:17 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -2.6 (--) --001517510fc8cf65a404836190b9 Content-Type: text/plain; charset=ISO-8859-1 This might be relevant: uniq: missing option -W / --check-fields=N http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00168.html Steve On Sat, Apr 3, 2010 at 14:39, Raphael Clifford <drraph@HIDDEN> wrote: > Please excuse the cross-post but I have been told this is the > appropriate place to place a feature request. > > Is it possible to make a feature request for uniq to add the "-k" > option to specify > fields? Interestingly uniq already has such things as > > -f, --skip-fields=N > avoid comparing the first N fields > and > > -s, --skip-chars=N > avoid comparing the first N characters > > but no explicit option to specify which fields should be considered > when doing the comparison. This would be very useful, for example, > when removing duplicates from time series data (where you are only > worried about consecutive duplicates on certain fields). The awk > equivalent would be something like > > awk '$2$3$4$5 != p; {p=$2$3$4$5}' > > for using fields 2 to 5 as comparators. > > Raphael > > P.S. http://www.opengroup.org/onlinepubs/9699919799/utilities/uniq.html > is the posix specification for uniq if that is of any interest. > Curiously it says nothing about which duplicate line to keep when you > don't consider all fields in the comparison. > > > > > > --001517510fc8cf65a404836190b9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This might be relevant:<br><br>uniq: missing option -W / --check-fields=3DN= <br><a href=3D"http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg0= 0168.html">http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00168= .html</a><br> <br><br><br>Steve<br><br><br><div class=3D"gmail_quote">On Sat, Apr 3, 2010= at 14:39, Raphael Clifford <span dir=3D"ltr"><<a href=3D"mailto:drraph@= gmail.com">drraph@HIDDEN</a>></span> wrote:<br><blockquote class=3D"g= mail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(= 204, 204, 204); padding-left: 1ex;"> Please excuse the cross-post but I have been told this is the<br> appropriate place to place a feature request.<br> <br> Is it possible to make a feature request for uniq to add the "-k"= <br> option to specify<br> fields? =A0Interestingly uniq already has such things as<br> <br> -f, --skip-fields=3DN<br> =A0 =A0 =A0 =A0 =A0 =A0 avoid comparing the first N fields<br> and<br> <br> =A0-s, --skip-chars=3DN<br> =A0 =A0 =A0 =A0 =A0 =A0 avoid comparing the first N characters<br> <br> but no explicit option to specify which fields should be considered<br> when doing the comparison. =A0This would be very useful, for example,<br> when removing duplicates from time series data (where you are only<br> worried about consecutive duplicates on certain fields). =A0The awk<br> equivalent would be something like<br> <br> awk '$2$3$4$5 !=3D =A0p; {p=3D$2$3$4$5}'<br> <br> for using fields 2 to 5 as comparators.<br> <br> Raphael<br> <br> P.S. <a href=3D"http://www.opengroup.org/onlinepubs/9699919799/utilities/un= iq.html" target=3D"_blank">http://www.opengroup.org/onlinepubs/9699919799/u= tilities/uniq.html</a><br> is the posix specification for uniq if that is of any interest.<br> Curiously it says nothing about which duplicate line to keep when you<br> don't consider all fields in the comparison.<br> <br> <br> <br> <br> <br> </blockquote></div><br> --001517510fc8cf65a404836190b9--
X-Loop: help-debbugs@HIDDEN Subject: bug#5832: Feature request: uniq -k Resent-From: Raphael Clifford <drraph@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-To: owner <at> debbugs.gnu.org Resent-CC: bug-coreutils@HIDDEN Resent-Date: Mon, 05 Apr 2010 09:39:02 +0000 Resent-Message-ID: <handler.5832.B5832.127046033124421 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 5832 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Steve Ward <planet36@HIDDEN> Cc: 5832 <at> debbugs.gnu.org Received: via spool by 5832-submit <at> debbugs.gnu.org id=B5832.127046033124421 (code B ref 5832); Mon, 05 Apr 2010 09:39:02 +0000 Received: (at 5832) by debbugs.gnu.org; 5 Apr 2010 09:38:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Nyile-0006Lq-7E for submit <at> debbugs.gnu.org; Mon, 05 Apr 2010 05:38:51 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <drraph@HIDDEN>) id 1NyiKY-0006Bf-E1 for 5832 <at> debbugs.gnu.org; Mon, 05 Apr 2010 05:10:51 -0400 Received: by fg-out-1718.google.com with SMTP id d23so991068fga.15 for <5832 <at> debbugs.gnu.org>; Mon, 05 Apr 2010 02:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=gp0P1M/FW+CaCaJNbY4lFN8YT8Z78Zz56XsaEujZ8pM=; b=rLGnM7xcm3QKG1K6/HqE0E0cw0ibYI9kB7sO5WIKJqLAl/AlpoGfEGoK3VoD7tcG8W QUAPO74yZS+dQw8zjK+xUM3H1+Jdym/TSL+gpi4NvyDTFCF8eTo++8AXDtLTpVR/w88g iG19noOWqprZX2kN759XxMY3szbYnWW5E/pjc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=oJMGCRy1wl5pYViC+TWJqGgTz4GsksQan0aE3ihdCH/LRpLXzwkFT2CcA5t2l+xakH 6/PWyLdKH1QuxjaxEjHxteV0l8of+SR82EstrcQwat1l2KQGaELBZtPswIEtlXKViQA0 yG5Jk32zGx0ldZMt5NUlNsZkXcA27ThEF42G0= MIME-Version: 1.0 Received: by 10.239.134.7 with HTTP; Mon, 5 Apr 2010 02:10:46 -0700 (PDT) In-Reply-To: <h2yf5c1222c1004032122g79c24f53n1c93351c4b0aee2c@HIDDEN> References: <p2sa8f0e1a61004031139mc725d94kf74612a01fd6179b@HIDDEN> <h2yf5c1222c1004032122g79c24f53n1c93351c4b0aee2c@HIDDEN> Date: Mon, 5 Apr 2010 10:10:46 +0100 Received: by 10.239.187.129 with SMTP id l1mr445078hbh.86.1270458646743; Mon, 05 Apr 2010 02:10:46 -0700 (PDT) Message-ID: <m2sa8f0e1a61004050210ldc78837au595997f4ff350adc@HIDDEN> From: Raphael Clifford <drraph@HIDDEN> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Mon, 05 Apr 2010 05:38:48 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.3 (-) Yes http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00211.html in particular is pretty much exactly the same feature request. What is the current thinking on this? Raphael On 4 April 2010 05:22, Steve Ward <planet36@HIDDEN> wrote: > This might be relevant: > > uniq: missing option -W / --check-fields=3DN > http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00168.html > > > > Steve > > > On Sat, Apr 3, 2010 at 14:39, Raphael Clifford <drraph@HIDDEN> wrote: >> >> Please excuse the cross-post but I have been told this is the >> appropriate place to place a feature request. >> >> Is it possible to make a feature request for uniq to add the "-k" >> option to specify >> fields? =A0Interestingly uniq already has such things as >> >> -f, --skip-fields=3DN >> =A0 =A0 =A0 =A0 =A0 =A0 avoid comparing the first N fields >> and >> >> =A0-s, --skip-chars=3DN >> =A0 =A0 =A0 =A0 =A0 =A0 avoid comparing the first N characters >> >> but no explicit option to specify which fields should be considered >> when doing the comparison. =A0This would be very useful, for example, >> when removing duplicates from time series data (where you are only >> worried about consecutive duplicates on certain fields). =A0The awk >> equivalent would be something like >> >> awk '$2$3$4$5 !=3D =A0p; {p=3D$2$3$4$5}' >> >> for using fields 2 to 5 as comparators. >> >> Raphael >> >> P.S. http://www.opengroup.org/onlinepubs/9699919799/utilities/uniq.html >> is the posix specification for uniq if that is of any interest. >> Curiously it says nothing about which duplicate line to keep when you >> don't consider all fields in the comparison. >> >> >> >> >> > >
X-Loop: help-debbugs@HIDDEN Subject: bug#5832: Feature request: uniq -k Resent-From: Jim Meyering <jim@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-To: owner <at> debbugs.gnu.org Resent-CC: bug-coreutils@HIDDEN Resent-Date: Fri, 09 Apr 2010 06:43:02 +0000 Resent-Message-ID: <handler.5832.B5832.127079537312217 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 5832 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Raphael Clifford <drraph@HIDDEN> Cc: Steve Ward <planet36@HIDDEN>, 5832 <at> debbugs.gnu.org Received: via spool by 5832-submit <at> debbugs.gnu.org id=B5832.127079537312217 (code B ref 5832); Fri, 09 Apr 2010 06:43:02 +0000 Received: (at 5832) by debbugs.gnu.org; 9 Apr 2010 06:42:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1O07vY-0003B0-UD for submit <at> debbugs.gnu.org; Fri, 09 Apr 2010 02:42:53 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <jim@HIDDEN>) id 1O07vV-0003At-Ga for 5832 <at> debbugs.gnu.org; Fri, 09 Apr 2010 02:42:51 -0400 Received: from smtp3-g21.free.fr (localhost [127.0.0.1]) by smtp3-g21.free.fr (Postfix) with ESMTP id 53BF9818120 for <5832 <at> debbugs.gnu.org>; Fri, 9 Apr 2010 08:42:42 +0200 (CEST) Received: from mx.meyering.net (mx.meyering.net [82.230.74.64]) by smtp3-g21.free.fr (Postfix) with ESMTP id 7482B81801B for <5832 <at> debbugs.gnu.org>; Fri, 9 Apr 2010 08:42:40 +0200 (CEST) Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id C59B994B; Fri, 9 Apr 2010 08:42:39 +0200 (CEST) From: Jim Meyering <jim@HIDDEN> In-Reply-To: <m2sa8f0e1a61004050210ldc78837au595997f4ff350adc@HIDDEN> (Raphael Clifford's message of "Mon, 5 Apr 2010 10:10:46 +0100") References: <p2sa8f0e1a61004031139mc725d94kf74612a01fd6179b@HIDDEN> <h2yf5c1222c1004032122g79c24f53n1c93351c4b0aee2c@HIDDEN> <m2sa8f0e1a61004050210ldc78837au595997f4ff350adc@HIDDEN> Date: Fri, 09 Apr 2010 08:42:39 +0200 Message-ID: <87sk755dpc.fsf@HIDDEN> Lines: 22 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -2.8 (--) Raphael Clifford wrote: > Yes http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00211.html > in particular is pretty much exactly the same feature request. > > What is the current thinking on this? uniq's -k is still something we'd like. >> uniq: missing option -W / --check-fields=N >> http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00168.html I glanced through most of that thread, and the guidance is still valid. If you are interested, be sure to start the copyright assignment paperwork: http://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING#n327 copyright and to read/follow the other guidelines in HACKING. 2nd most important: to save yourself the pain of reworking big chunks of code, and to keep review request size manageable, I suggest you keep the mailing list in the loop on what you're doing/planning.
X-Loop: help-debbugs@HIDDEN Subject: bug#5832: bug#10365: [PATCH] uniq: add ability to skip last N chars or fields Resent-From: Paul Eggert <eggert@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-coreutils@HIDDEN Resent-Date: Mon, 26 Dec 2011 17:43:04 +0000 Resent-Message-ID: <handler.5832.B5832.132492133010907 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 5832 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady <P@HIDDEN> Cc: Adrien Kunysz <adrien@HIDDEN>, 10365 <at> debbugs.gnu.org, 5832 <at> debbugs.gnu.org Received: via spool by 5832-submit <at> debbugs.gnu.org id=B5832.132492133010907 (code B ref 5832); Mon, 26 Dec 2011 17:43:04 +0000 Received: (at 5832) by debbugs.gnu.org; 26 Dec 2011 17:42:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1RfEYs-0002po-2z for submit <at> debbugs.gnu.org; Mon, 26 Dec 2011 12:42:10 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <eggert@HIDDEN>) id 1RfEYo-0002pa-IP; Mon, 26 Dec 2011 12:42:07 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 970DFA60008; Mon, 26 Dec 2011 09:39:31 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uLml8sLPEteI; Mon, 26 Dec 2011 09:39:31 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 310FCA60007; Mon, 26 Dec 2011 09:39:31 -0800 (PST) Message-ID: <4EF8B14E.6030004@HIDDEN> Date: Mon, 26 Dec 2011 09:39:26 -0800 From: Paul Eggert <eggert@HIDDEN> Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 References: <20111225125418.GA1488@chouffe> <4EF8A259.6020404@HIDDEN> In-Reply-To: <4EF8A259.6020404@HIDDEN> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -2.9 (--) On 12/26/11 08:35, P=C3=A1draig Brady wrote: > supporting --key would not provide this functionality. It would support it in the most common cases, no? That is, if every line has (say) 10 fields, then the proposed 'uniq -F3' would be equivalent to the proposed 'uniq -k1,7'. I can't offhand think of good use cases for uniq -F that would not be subsumed by uniq -k.
X-Loop: help-debbugs@HIDDEN Subject: bug#5832: bug#10365: [PATCH] uniq: add ability to skip last N chars or fields Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady <P@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-coreutils@HIDDEN Resent-Date: Mon, 26 Dec 2011 18:07:02 +0000 Resent-Message-ID: <handler.5832.B5832.132492277815899 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 5832 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Paul Eggert <eggert@HIDDEN> Cc: Adrien Kunysz <adrien@HIDDEN>, 10365 <at> debbugs.gnu.org, 5832 <at> debbugs.gnu.org Received: via spool by 5832-submit <at> debbugs.gnu.org id=B5832.132492277815899 (code B ref 5832); Mon, 26 Dec 2011 18:07:02 +0000 Received: (at 5832) by debbugs.gnu.org; 26 Dec 2011 18:06:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1RfEwE-00048K-LL for submit <at> debbugs.gnu.org; Mon, 26 Dec 2011 13:06:18 -0500 Received: from mail3.vodafone.ie ([213.233.128.45]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <P@HIDDEN>) id 1RfEwC-000487-FB; Mon, 26 Dec 2011 13:06:17 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAKi2+E5tTn9m/2dsb2JhbAAMMQYOhQGkXYVSAQEBAwEjDwFGBQsLDQsCAgUWCwICCQMCAQIBRQYNAQcBAYd2pBuRB4EvhzKCGIEWBJpxjA43 Received: from unknown (HELO [192.168.1.79]) ([109.78.127.102]) by mail3.vodafone.ie with ESMTP; 26 Dec 2011 18:03:41 +0000 Message-ID: <4EF8B6FC.3080407@HIDDEN> Date: Mon, 26 Dec 2011 18:03:40 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady <P@HIDDEN> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 References: <20111225125418.GA1488@chouffe> <4EF8A259.6020404@HIDDEN> <4EF8B14E.6030004@HIDDEN> In-Reply-To: <4EF8B14E.6030004@HIDDEN> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.5 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -2.5 (--) On 12/26/2011 05:39 PM, Paul Eggert wrote: > On 12/26/11 08:35, Pádraig Brady wrote: >> supporting --key would not provide this functionality. > > It would support it in the most common cases, no? > That is, if every line has (say) 10 fields, then > the proposed 'uniq -F3' would be equivalent to > the proposed 'uniq -k1,7'. That's what I thought at first too, but then why didn't Adrien propose the more normal --check-fields=7 rather than the unusual -F3. > I can't offhand think of good use cases for uniq -F > that would not be subsumed by uniq -k. Me too, Having a variable number of fields per line, but ignoring the last constant N fields is very unusual, and why I asked for a concrete example. Personally I'm leaning towards suggesting `the rev| uniq -f | rev` is fine for this edge case. cheers, Pádraig.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.