From owner-freebsd-current@FreeBSD.ORG Thu Sep 7 01:11:39 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 2F55B16A4DD; Thu, 7 Sep 2006 01:11:39 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk.360sip.com [72.236.70.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id D593C43D66; Thu, 7 Sep 2006 01:11:30 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.0.49] ([204.244.149.125]) (authenticated bits=0) by sippysoft.com (8.13.6/8.13.6) with ESMTP id k871BPQm075042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 6 Sep 2006 18:11:26 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <44FF71AD.7060508@FreeBSD.org> Date: Wed, 06 Sep 2006 18:11:09 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Garance A Drosehn 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, Doug Barton , Julian Elischer , Peter Jeremy Subject: Re: Attempt #3, adding a new command 'sfilter' 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: Thu, 07 Sep 2006 01:11:39 -0000 Why not just write simple 5-line script in your favorite scripting language (perl, python, ruby etc) that does just this and forget about it? I don't think performance is really a concern here since the most time this program will spend waiting for the I/O anyway, so that doing it in C makes little or no sense. IMHO this is one of the reasons we do have all those lightweight languages around - to avoid having separate utility and/or command line option for each and every particular situation. -Maxim Garance A Drosehn wrote: > 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. > > For what it's worth, I've improved my previous update so that the > value of time is cached, thus avoiding unnecessary calls to > localtime() and strftime(). > > At the moment this still exists as an update to `cat', just so > the diff-output is readable. But I'd certainly be willing to > install the result as a separate new command if that would work > better. If there is support for that, I would install it as an > `sfilter' command. Simple Filter. > > If I do install it as a separate command, then I would be > extremely tempted to also add in 'unix2dos' and 'dos2unix' > capability. Yes, I know everyone is rolling their eyes at this > point, but if you look at the actual code already in `cat', it > would require very few bytes of additional code to support that. > > If I were to install these ideas as a separate new command, would > that be "acceptable-enough" for a new utility in the base OS? > > > ------------------------------------------------------------------------ > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"