From owner-freebsd-current@FreeBSD.ORG Tue Sep 5 22:32:51 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 087D516A4E5; Tue, 5 Sep 2006 22:32:51 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp6.server.rpi.edu (smtp6.server.rpi.edu [128.113.2.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id DECDB43D49; Tue, 5 Sep 2006 22:32:47 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp6.server.rpi.edu (8.13.1/8.13.1) with ESMTP id k85MWhmZ031622; Tue, 5 Sep 2006 18:32:44 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <44FDF36A.3010608@FreeBSD.org> References: <200608281545.k7SFjn6l063922@lurza.secnetix.de> <200609020956.54008.Lucas.James@ldjcs.com.au> <20060902031247.GE749@turion.vk2pj.dyndns.org> <20060904192006.GA3292@turion.vk2pj.dyndns.org> <44FD994C.70104@errno.com> <44FDEE7C.9060104@FreeBSD.org> <44FDF245.9000302@elischer.org> <44FDF36A.3010608@FreeBSD.org> Date: Tue, 5 Sep 2006 18:32:43 -0400 To: Doug Barton , Julian Elischer From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) Cc: Peter Jeremy , freebsd-current@FreeBSD.org, Garance A Drosehn Subject: Re: Adding a '-D date' option to `cat' X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2006 22:32:51 -0000 At 3:00 PM -0700 9/5/06, Doug Barton wrote: >Julian Elischer wrote: > >> then there will be a bikeshed about adding a new tool > >... which can safely be ignored, even if it occurs, because creating new >and potentially useful tools always creates less drama then mucking about >with old (or really old) ones. I haven't heard anyone say, "No such >functionality should exist in FreeBSD," but I have heard several people >say "Don't bastardize the Unix model." I even like Sam's proposed name. I think his suggestion is the wrong solution. Is it *really* more efficient to have ten commands, each of which will duplicate 99% of the code in cat? And then users are supposed to string all of those commands together, as is often talked about as a "virtue", such as: somecommand | number | stamp | disptab | dispnonprint Is that *really* more efficient? Four commands, taking up 36K of disk space, instead of one command in 9K? Four processes doing the exact same read/write loop, where 99% of the processing is in that reading and writing? And, oops, I put those in the wrong order, because I wanted 'stamp' to put a tab between the timestamp and the real data, and disptab is going to modify the tab that I do not want it to modify. Four commands that users have to know about, four man pages to read. I'd be willing to add one command that knew how to apply multiple simple filters, and in fact I think that would be a better solution. But I am certain that I'll get into another fight if I suggest that, so instead I'm suggesting the option which I think is the least disruption to the base system. 700 bytes, instead of a whole new command. > > Date could have had this feature added in 20 lines of C. >> you'd rather create a whole new beaurocracy. > >What would be really useful here is if the people who want this could >focus on the end result (having the tool you need to do the job) rather >than the methodology of achieving that result. The door is open, walk >through it. That sounds so nice. I did that with pgrep and pkill, and at the time I got all kinds of flak for it. Most of it private. Sure, people use those commands now that they are there, but at the time I was told "you can get the same effect by piping `ps` through `grep`", and that I just didn't understand the One True Unix Way, which apparently is to never add anything to the base system. You may think I'm kidding, but when I did the commits for those to commands I did it with the thought "Well, this may lose me my commit bit, but I'm irritated enough that I'm going to try it anyway, and if I lose my commit bit then that will be fine with me". I had received that much flak. -- Garance Alistair Drosehn = drosehn@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA