Assaf Gordon <assafgordon@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Assaf Gordon <assafgordon@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 7455) by debbugs.gnu.org; 24 Nov 2010 07:11:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 24 02:11:35 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 1PL9Vg-0005eS-FD for submit <at> debbugs.gnu.org; Wed, 24 Nov 2010 02:11:35 -0500 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <jim@HIDDEN>) id 1PL9Vd-0005eC-HP for 7455 <at> debbugs.gnu.org; Wed, 24 Nov 2010 02:11:18 -0500 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 5C5FB60070; Wed, 24 Nov 2010 08:16:35 +0100 (CET) From: Jim Meyering <jim@HIDDEN> To: =?utf-8?Q?P=C3=A1draig?= Brady <P@HIDDEN> Subject: Re: bug#7455: cut - lack of --merge-delimiters option In-Reply-To: <4CEBD1B5.5050600@HIDDEN> (=?utf-8?Q?=22P=C3=A1draig?= Brady"'s message of "Tue, 23 Nov 2010 14:37:41 +0000") References: <AANLkTi=Xi9A+fOJ2WfDHpEOrsT2Jx5o6JZLeG4=kDJ=u@HIDDEN> <4CE9C987.8070505@HIDDEN> <87fwutna7h.fsf@HIDDEN> <AANLkTimTCtdN=OdoaxN9Z2u27XZTp1apAryNxfbmk57G@HIDDEN> <4CEBD1B5.5050600@HIDDEN> Date: Wed, 24 Nov 2010 08:16:35 +0100 Message-ID: <87y68jcht8.fsf@HIDDEN> Lines: 35 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: 7455 Cc: 7455 <at> debbugs.gnu.org, Leo Lopes <lleeoo@HIDDEN> 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: -3.6 (---) P=C3=A1draig Brady wrote: > On 23/11/10 12:57, Leo Lopes wrote: >> Thanks for replying. >>> >>> makes me wonder if it's just a question of documentation >>> and/or general education. cut is a very specialized tool. >>> If it doesn't do the job, using a more general-purpose one >>> is easy, once you see how. Do you think that adding a few >>> examples in "info cut" (including uses of awk) would suffice? >>> >> >> I think adding the awk or tr examples in the manpage/info page would >> be helpful. However, I personally don't think it would suffice. I >> think it would still violate the principle of least surprise. > > Well it's still marginal in my mind. > > The argument for supporting `cut -d '[:blank:]'` is that > `sort` and `join` for e.g. support this notion of a field by default, > so it's a very common requirement which we might want to > support directly, rather than relying on `awk`. That is a compelling argument. For me, it has tipped the balance, so now I'm slightly in favor of some sort of functional change. > We should at least document something like this in: info cut invocation > > Also consider using `awk` which supports more sophisticated field > processing. `awk` by default will use (and discard) blank characters > to separate fields. Leading and trailing blanks on a line are ignored. > > Examples: > > print the 2nd field: awk '{print $2}' > print the 2nd to last field: awk '{print $NF-1}'
owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN
:bug#7455
; Package coreutils
.
Full text available.Received: (at 7455) by debbugs.gnu.org; 24 Nov 2010 01:10:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 23 20:10:59 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 1PL3sx-00060w-Gd for submit <at> debbugs.gnu.org; Tue, 23 Nov 2010 20:10:59 -0500 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <lleeoo@HIDDEN>) id 1PL3sw-00060k-3c for 7455 <at> debbugs.gnu.org; Tue, 23 Nov 2010 20:10:58 -0500 Received: by wwf26 with SMTP id 26so3682638wwf.15 for <7455 <at> debbugs.gnu.org>; Tue, 23 Nov 2010 17:16:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=WwVs4kFcVO0YpQMi+b1mVPnA9AmcL3LbIbzdRZjL3F8=; b=WBmkz0zDlfrjtPYTjyPr7LccgAJpZVBmGTv7WGPFTmbO10hAubIgb1iQ11DhS9fO+B p6x5QTv016s8JB2/+VKnCX2TFFOP+giUg4A00y6suQCUhoq+Sq9bkXOhqKMI3c9mHiP0 icde/uQIBb2ZU2++bkpRPJC/L6wwcwCx2d3IU= 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:content-transfer-encoding; b=jEmp/lbjdvY3bsdJNbKYKQ2mzDpZ5y3MiSmaOgmJqfIjdcZiUgt8xfHJhCT2GVtrF9 eWnhOo5azgUDYd12lhVCFW4bCIFMkaBn6AIcqtfYRSI+zsjay7d+XlsEBZSfE5L/DFU3 WL4iqioLjHcF/4vSFKipzD4SNlZpp4YWLaeog= Received: by 10.216.141.79 with SMTP id f57mr7010858wej.101.1290561376463; Tue, 23 Nov 2010 17:16:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.245.133 with HTTP; Tue, 23 Nov 2010 17:15:56 -0800 (PST) In-Reply-To: <4CEBD81F.1090209@HIDDEN> References: <AANLkTi=Xi9A+fOJ2WfDHpEOrsT2Jx5o6JZLeG4=kDJ=u@HIDDEN> <4CE9C987.8070505@HIDDEN> <87fwutna7h.fsf@HIDDEN> <AANLkTimTCtdN=OdoaxN9Z2u27XZTp1apAryNxfbmk57G@HIDDEN> <4CEBD1B5.5050600@HIDDEN> <4CEBD81F.1090209@HIDDEN> From: Leo Lopes <lleeoo@HIDDEN> Date: Wed, 24 Nov 2010 12:15:56 +1100 Message-ID: <AANLkTi=8ZzUvrKK55kuKtr5kCcNNzH47_hJx454QpWz-@mail.gmail.com> Subject: Re: bug#7455: cut - lack of --merge-delimiters option To: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@HIDDEN> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 7455 Cc: 7455 <at> debbugs.gnu.org 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: -3.3 (---) I think we are coming back to the same issue, and it is one of culture and design choice, not of requirements and design needs. So it is definitely marginal. In essence, the argument is this: we don't need cut at all. Everything cut can do, awk can do and other tools can also do. However, if we will have a tool called cut that cuts columns, it should do at least the basics that users expect. Among those expectations is merging delimiters. When those expectations are not met customers are dissatisfied. Of course, you guys write and manage the tools, and this is a management issue if there ever was one. So whatever decision you make is the one people should be happy to live with. I am just putting my 2c in to the record. Cheers, Leo. 2010/11/24 P=E1draig Brady <P@HIDDEN>: > On 23/11/10 14:37, P=E1draig Brady wrote: >> On 23/11/10 12:57, Leo Lopes wrote: >>> Thanks for replying. >>> >>>> >>>> makes me wonder if it's just a question of documentation >>>> and/or general education. =A0cut is a very specialized tool. >>>> If it doesn't do the job, using a more general-purpose one >>>> is easy, once you see how. =A0Do you think that adding a few >>>> examples in "info cut" (including uses of awk) would suffice? >>>> >>> >>> I think adding the awk or tr examples in the manpage/info page would >>> be helpful. However, I personally don't think it would suffice. I >>> think it would still violate the principle of least surprise. >> >> Well it's still marginal in my mind. >> >> The argument for supporting `cut -d '[:blank:]'` is that >> `sort` and `join` for e.g. support this notion of a field by default, >> so it's a very common requirement which we might want to >> support directly, rather than relying on `awk`. >> >> We should at least document something like this in: info cut invocation >> >> Also consider using `awk` which supports more sophisticated field >> processing. =A0`awk` by default will use (and discard) blank characters >> to separate fields. =A0Leading and trailing blanks on a line are ignored= . >> >> Examples: >> >> =A0 print the 2nd field: =A0 =A0 =A0 =A0 awk '{print $2}' >> =A0 print the 2nd to last field: awk '{print $NF-1}' > > And another common question is about reordering fields > > =A0 =A0reorder the 1st two fields: =A0awk '{print $2,$1}' > >
owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN
:bug#7455
; Package coreutils
.
Full text available.Received: (at 7455) by debbugs.gnu.org; 23 Nov 2010 15:00:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 23 10:00:59 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 1PKuMb-0000gw-J3 for submit <at> debbugs.gnu.org; Tue, 23 Nov 2010 10:00:57 -0500 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from <P@HIDDEN>) id 1PKuMZ-0000gp-V8 for 7455 <at> debbugs.gnu.org; Tue, 23 Nov 2010 10:00:56 -0500 Received: (qmail 77193 invoked from network); 23 Nov 2010 15:06:11 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 23 Nov 2010 15:06:11 -0000 Message-ID: <4CEBD81F.1090209@HIDDEN> Date: Tue, 23 Nov 2010 15:05:03 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@HIDDEN> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Leo Lopes <lleeoo@HIDDEN> Subject: Re: bug#7455: cut - lack of --merge-delimiters option References: <AANLkTi=Xi9A+fOJ2WfDHpEOrsT2Jx5o6JZLeG4=kDJ=u@HIDDEN> <4CE9C987.8070505@HIDDEN> <87fwutna7h.fsf@HIDDEN> <AANLkTimTCtdN=OdoaxN9Z2u27XZTp1apAryNxfbmk57G@HIDDEN> <4CEBD1B5.5050600@HIDDEN> In-Reply-To: <4CEBD1B5.5050600@HIDDEN> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7455 Cc: 7455 <at> debbugs.gnu.org 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.7 (--) On 23/11/10 14:37, Pádraig Brady wrote: > On 23/11/10 12:57, Leo Lopes wrote: >> Thanks for replying. >> >>> >>> makes me wonder if it's just a question of documentation >>> and/or general education. cut is a very specialized tool. >>> If it doesn't do the job, using a more general-purpose one >>> is easy, once you see how. Do you think that adding a few >>> examples in "info cut" (including uses of awk) would suffice? >>> >> >> I think adding the awk or tr examples in the manpage/info page would >> be helpful. However, I personally don't think it would suffice. I >> think it would still violate the principle of least surprise. > > Well it's still marginal in my mind. > > The argument for supporting `cut -d '[:blank:]'` is that > `sort` and `join` for e.g. support this notion of a field by default, > so it's a very common requirement which we might want to > support directly, rather than relying on `awk`. > > We should at least document something like this in: info cut invocation > > Also consider using `awk` which supports more sophisticated field > processing. `awk` by default will use (and discard) blank characters > to separate fields. Leading and trailing blanks on a line are ignored. > > Examples: > > print the 2nd field: awk '{print $2}' > print the 2nd to last field: awk '{print $NF-1}' And another common question is about reordering fields reorder the 1st two fields: awk '{print $2,$1}'
owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN
:bug#7455
; Package coreutils
.
Full text available.Received: (at 7455) by debbugs.gnu.org; 23 Nov 2010 14:33:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 23 09:33:46 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 1PKtwI-0000Uh-5t for submit <at> debbugs.gnu.org; Tue, 23 Nov 2010 09:33:46 -0500 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from <P@HIDDEN>) id 1PKtw5-0000Uc-S8 for 7455 <at> debbugs.gnu.org; Tue, 23 Nov 2010 09:33:44 -0500 Received: (qmail 71409 invoked from network); 23 Nov 2010 14:38:49 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 23 Nov 2010 14:38:49 -0000 Message-ID: <4CEBD1B5.5050600@HIDDEN> Date: Tue, 23 Nov 2010 14:37:41 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@HIDDEN> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Leo Lopes <lleeoo@HIDDEN> Subject: Re: bug#7455: cut - lack of --merge-delimiters option References: <AANLkTi=Xi9A+fOJ2WfDHpEOrsT2Jx5o6JZLeG4=kDJ=u@HIDDEN> <4CE9C987.8070505@HIDDEN> <87fwutna7h.fsf@HIDDEN> <AANLkTimTCtdN=OdoaxN9Z2u27XZTp1apAryNxfbmk57G@HIDDEN> In-Reply-To: <AANLkTimTCtdN=OdoaxN9Z2u27XZTp1apAryNxfbmk57G@HIDDEN> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7455 Cc: 7455 <at> debbugs.gnu.org, Jim Meyering <jim@HIDDEN> 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.7 (--) On 23/11/10 12:57, Leo Lopes wrote: > Thanks for replying. > >> >> makes me wonder if it's just a question of documentation >> and/or general education. cut is a very specialized tool. >> If it doesn't do the job, using a more general-purpose one >> is easy, once you see how. Do you think that adding a few >> examples in "info cut" (including uses of awk) would suffice? >> > > I think adding the awk or tr examples in the manpage/info page would > be helpful. However, I personally don't think it would suffice. I > think it would still violate the principle of least surprise. Well it's still marginal in my mind. The argument for supporting `cut -d '[:blank:]'` is that `sort` and `join` for e.g. support this notion of a field by default, so it's a very common requirement which we might want to support directly, rather than relying on `awk`. We should at least document something like this in: info cut invocation Also consider using `awk` which supports more sophisticated field processing. `awk` by default will use (and discard) blank characters to separate fields. Leading and trailing blanks on a line are ignored. Examples: print the 2nd field: awk '{print $2}' print the 2nd to last field: awk '{print $NF-1}'
owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN
:bug#7455
; Package coreutils
.
Full text available.Received: (at 7455) by debbugs.gnu.org; 23 Nov 2010 12:52:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 23 07:52:30 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 1PKsMH-0007zT-U0 for submit <at> debbugs.gnu.org; Tue, 23 Nov 2010 07:52:30 -0500 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <lleeoo@HIDDEN>) id 1PKsMF-0007zO-EN for 7455 <at> debbugs.gnu.org; Tue, 23 Nov 2010 07:52:28 -0500 Received: by wwf26 with SMTP id 26so1799480wwf.15 for <7455 <at> debbugs.gnu.org>; Tue, 23 Nov 2010 04:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=H+ggNW6pcOBYEE/TQLKJZknH6AoaY3b1398mn4cSfgM=; b=PF6cwbNbP/gZKiskuAC+xXcNlchyrvYT4oC5BmcedcOcSVUEA3wKL3SYfTYAo+3egL 5MZ33aImu1eaIGfNS57l43b4+fB1rZ7ZuADPlvByv+9+QE3XWWYVB56aaSjxGS/O77TQ +IxyYtKoz0sZAEcm7q1nqc6IbB4dyky1i1Ils= 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:content-transfer-encoding; b=SVC5HSvcq7W4/IK0jtTbYT0HdwAVj+srtvyjpdE+vcxkQ5RfoUEb+9lm/Ed3GyOlNi BEzf+qAZf0xG7D6x0kfYM7iLtZetR59q9iYCGshZxbWpmn/sidMMDpdJEJ/VcPtWvEoz aXw9BRw25G51X5edwe1HpZpwJCf6xq+rU9fA4= Received: by 10.216.185.203 with SMTP id u53mr6234797wem.86.1290517063719; Tue, 23 Nov 2010 04:57:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.245.133 with HTTP; Tue, 23 Nov 2010 04:57:23 -0800 (PST) In-Reply-To: <87fwutna7h.fsf@HIDDEN> References: <AANLkTi=Xi9A+fOJ2WfDHpEOrsT2Jx5o6JZLeG4=kDJ=u@HIDDEN> <4CE9C987.8070505@HIDDEN> <87fwutna7h.fsf@HIDDEN> From: Leo Lopes <lleeoo@HIDDEN> Date: Tue, 23 Nov 2010 23:57:23 +1100 Message-ID: <AANLkTimTCtdN=OdoaxN9Z2u27XZTp1apAryNxfbmk57G@HIDDEN> Subject: Re: bug#7455: cut - lack of --merge-delimiters option To: Jim Meyering <jim@HIDDEN> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: 7455 Cc: 7455 <at> debbugs.gnu.org, =?ISO-8859-1?Q?P=E1draig_Brady?= <P@HIDDEN> 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: -3.7 (---) Thanks for replying. > > makes me wonder if it's just a question of documentation > and/or general education. =A0cut is a very specialized tool. > If it doesn't do the job, using a more general-purpose one > is easy, once you see how. =A0Do you think that adding a few > examples in "info cut" (including uses of awk) would suffice? > I think adding the awk or tr examples in the manpage/info page would be helpful. However, I personally don't think it would suffice. I think it would still violate the principle of least surprise. Cheers, Leo.
owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN
:bug#7455
; Package coreutils
.
Full text available.Received: (at 7455) by debbugs.gnu.org; 22 Nov 2010 06:23:24 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 22 01:23:24 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 1PKPoB-0001k9-ME for submit <at> debbugs.gnu.org; Mon, 22 Nov 2010 01:23:23 -0500 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <jim@HIDDEN>) id 1PKPo8-0001k3-Oa for 7455 <at> debbugs.gnu.org; Mon, 22 Nov 2010 01:23:21 -0500 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 484D9601B5; Mon, 22 Nov 2010 07:28:34 +0100 (CET) From: Jim Meyering <jim@HIDDEN> To: =?utf-8?Q?P=C3=A1draig?= Brady <P@HIDDEN> Subject: Re: bug#7455: cut - lack of --merge-delimiters option In-Reply-To: <4CE9C987.8070505@HIDDEN> (=?utf-8?Q?=22P=C3=A1draig?= Brady"'s message of "Mon, 22 Nov 2010 01:38:15 +0000") References: <AANLkTi=Xi9A+fOJ2WfDHpEOrsT2Jx5o6JZLeG4=kDJ=u@HIDDEN> <4CE9C987.8070505@HIDDEN> Date: Mon, 22 Nov 2010 07:28:34 +0100 Message-ID: <87fwutna7h.fsf@HIDDEN> Lines: 45 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: 7455 Cc: 7455 <at> debbugs.gnu.org, Leo Lopes <lleeoo@HIDDEN> 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: -5.6 (-----) P=C3=A1draig Brady wrote: > On 21/11/10 01:06, Leo Lopes wrote: >> Hi Folks, >> >> Sorry to revive a 2-year old thread, but the rest of the thread is easy = to find. >> >> Exec summary: a user wanted a merge delimiters options, and the >> discussion kind of digressed to "there is a more clever way to do it", >> and "why should this be in cut"? >> >> The responses in the thread as to why this feature isn't yet in cut >> are reasonable for the issues raised there. However, the most >> important (IMHO) use case wasn't considered: >> >> The --merge-delimiters (or -m) feature should be part of cut because >> people have come to expect that behavior from a column selector. Every >> major application has this option. The fact that cut doesn't have the >> feature is not a sign of good design, but rather historical accident. >> When people don't find the feature, search for it, then find the >> response "how come you don't know how to use awk and don't know this >> special feature of ls?" it violates the principle of least surprise >> among other things. > > This pops up every so often: > http://lists.gnu.org/archive/html/bug-coreutils/2009-09/msg00165.html > > That thread, considered using: cut -d '[:blank:]' > but this was deemed sufficient: tr -s '[:blank:]' ' ' | cut -d ' ' > > I.E. it's marginal. However considering also that it's > awkward currently to parse /proc/partitions for e.g. > because it has leading blanks. > So perhaps if we did support the above, it could > have the extra functionality of ignoring leading blanks? I agree that this is marginal. However, seeing one example of how easy it is with awk awk '{print $3,$4}' /proc/partitions makes me wonder if it's just a question of documentation and/or general education. cut is a very specialized tool. If it doesn't do the job, using a more general-purpose one is easy, once you see how. Do you think that adding a few examples in "info cut" (including uses of awk) would suffice?
owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN
:bug#7455
; Package coreutils
.
Full text available.Received: (at 7455) by debbugs.gnu.org; 22 Nov 2010 01:34:10 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 21 20:34:10 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 1PKLIH-0008JF-Kx for submit <at> debbugs.gnu.org; Sun, 21 Nov 2010 20:34:10 -0500 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from <P@HIDDEN>) id 1PKLIB-0008It-Kt for 7455 <at> debbugs.gnu.org; Sun, 21 Nov 2010 20:34:07 -0500 Received: (qmail 17065 invoked from network); 22 Nov 2010 01:39:16 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 22 Nov 2010 01:39:16 -0000 Message-ID: <4CE9C987.8070505@HIDDEN> Date: Mon, 22 Nov 2010 01:38:15 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@HIDDEN> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Leo Lopes <lleeoo@HIDDEN> Subject: Re: bug#7455: cut - lack of --merge-delimiters option References: <AANLkTi=Xi9A+fOJ2WfDHpEOrsT2Jx5o6JZLeG4=kDJ=u@HIDDEN> In-Reply-To: <AANLkTi=Xi9A+fOJ2WfDHpEOrsT2Jx5o6JZLeG4=kDJ=u@HIDDEN> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7455 Cc: 7455 <at> debbugs.gnu.org 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.7 (--) On 21/11/10 01:06, Leo Lopes wrote: > Hi Folks, > > Sorry to revive a 2-year old thread, but the rest of the thread is easy to find. > > Exec summary: a user wanted a merge delimiters options, and the > discussion kind of digressed to "there is a more clever way to do it", > and "why should this be in cut"? > > The responses in the thread as to why this feature isn't yet in cut > are reasonable for the issues raised there. However, the most > important (IMHO) use case wasn't considered: > > The --merge-delimiters (or -m) feature should be part of cut because > people have come to expect that behavior from a column selector. Every > major application has this option. The fact that cut doesn't have the > feature is not a sign of good design, but rather historical accident. > When people don't find the feature, search for it, then find the > response "how come you don't know how to use awk and don't know this > special feature of ls?" it violates the principle of least surprise > among other things. This pops up every so often: http://lists.gnu.org/archive/html/bug-coreutils/2009-09/msg00165.html That thread, considered using: cut -d '[:blank:]' but this was deemed sufficient: tr -s '[:blank:]' ' ' | cut -d ' ' I.E. it's marginal. However considering also that it's awkward currently to parse /proc/partitions for e.g. because it has leading blanks. So perhaps if we did support the above, it could have the extra functionality of ignoring leading blanks? cheers, Pádraig.
owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN
:bug#7455
; Package coreutils
.
Full text available.Received: (at submit) by debbugs.gnu.org; 21 Nov 2010 01:26:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 20 20:26:46 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 1PJyhZ-0007nq-NJ for submit <at> debbugs.gnu.org; Sat, 20 Nov 2010 20:26:45 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <lleeoo@HIDDEN>) id 1PJyJR-0007eR-7D for submit <at> debbugs.gnu.org; Sat, 20 Nov 2010 20:01:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <lleeoo@HIDDEN>) id 1PJyOR-00041m-Lf for submit <at> debbugs.gnu.org; Sat, 20 Nov 2010 20:07:00 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) 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.1 Received: from lists.gnu.org ([199.232.76.165]:37701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <lleeoo@HIDDEN>) id 1PJyOR-00041i-Jq for submit <at> debbugs.gnu.org; Sat, 20 Nov 2010 20:06:59 -0500 Received: from [140.186.70.92] (port=47033 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJyOQ-0008DJ-Nc for bug-coreutils@HIDDEN; Sat, 20 Nov 2010 20:06:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <lleeoo@HIDDEN>) id 1PJyOP-00041W-M2 for bug-coreutils@HIDDEN; Sat, 20 Nov 2010 20:06:58 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:41370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <lleeoo@HIDDEN>) id 1PJyOP-00041P-HD for bug-coreutils@HIDDEN; Sat, 20 Nov 2010 20:06:57 -0500 Received: by wwc33 with SMTP id 33so6261700wwc.30 for <bug-coreutils@HIDDEN>; Sat, 20 Nov 2010 17:06:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=QhDSfxT8coA2ju9k0vrsHErppFM4vTaLKxU64w/eCcQ=; b=bYnBeaTzbZ9CvPoZvNkRD2G1P0YOvB2AMgU7uwsGfXf2PqnzPuaMUrbSqTBBUppFat XdUxoB5tYEWvB1qb6CtTQqhkKieiLo0tVBfYfvNXm3obCuQUTMt3oflNoSDSTQyP/uGd HqaGDeN+zT/afDwcfIs7Tj4WuzJfQ0ddSMcTo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=wzPvfantj6FFAG8MBSi+6DjUB00Ss9ULxG5A6uN3NUVT2fFt7v1216tr65gtbH3pP0 m8DcUFfLpymiqGBlyyC2H5a8w/eVqJu6d2SBpbnqIKWPbr6CJoFwpiU5yBfIQBHOltjj Z78hX9JL1iPlgqwGF5Xas2/D9xLt8/Ory2ZyA= Received: by 10.216.181.202 with SMTP id l52mr3369265wem.24.1290301615544; Sat, 20 Nov 2010 17:06:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.245.133 with HTTP; Sat, 20 Nov 2010 17:06:35 -0800 (PST) From: Leo Lopes <lleeoo@HIDDEN> Date: Sun, 21 Nov 2010 12:06:35 +1100 Message-ID: <AANLkTi=Xi9A+fOJ2WfDHpEOrsT2Jx5o6JZLeG4=kDJ=u@HIDDEN> Subject: Re: cut - lack of --merge-delimiters option To: bug-coreutils@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 eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 20 Nov 2010 20:26:45 -0500 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: -5.9 (-----) Hi Folks, Sorry to revive a 2-year old thread, but the rest of the thread is easy to find. Exec summary: a user wanted a merge delimiters options, and the discussion kind of digressed to "there is a more clever way to do it", and "why should this be in cut"? The responses in the thread as to why this feature isn't yet in cut are reasonable for the issues raised there. However, the most important (IMHO) use case wasn't considered: The --merge-delimiters (or -m) feature should be part of cut because people have come to expect that behavior from a column selector. Every major application has this option. The fact that cut doesn't have the feature is not a sign of good design, but rather historical accident. When people don't find the feature, search for it, then find the response "how come you don't know how to use awk and don't know this special feature of ls?" it violates the principle of least surprise among other things. Cheers, Leo.
Leo Lopes <lleeoo@HIDDEN>
:bug-coreutils@HIDDEN
.
Full text available.owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN
:bug#7455
; Package coreutils
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.