Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Sep 2006 18:11:09 -0700
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        Garance A Drosehn <gad@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, Doug Barton <dougb@FreeBSD.org>, Julian Elischer <julian@elischer.org>, Peter Jeremy <peterjeremy@optushome.com.au>
Subject:   Re: Attempt #3, adding a new command 'sfilter'
Message-ID:  <44FF71AD.7060508@FreeBSD.org>
In-Reply-To: <p06230942c124de77d7de@[128.113.24.47]>
References:  <200608281545.k7SFjn6l063922@lurza.secnetix.de>	<p06230928c11e2298ca97@[128.113.24.47]>	<200609020956.54008.Lucas.James@ldjcs.com.au>	<20060902031247.GE749@turion.vk2pj.dyndns.org>	<20060904192006.GA3292@turion.vk2pj.dyndns.org>	<p06230937c122c6983e00@[128.113.24.47]> <44FD994C.70104@errno.com>	<44FDEE7C.9060104@FreeBSD.org> <44FDF245.9000302@elischer.org>	<44FDF36A.3010608@FreeBSD.org> <p06230942c124de77d7de@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
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"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44FF71AD.7060508>