Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Sep 2006 15:02:19 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        freebsd-current@freebsd.org, Peter Jeremy <peterjeremy@optushome.com.au>, Garance A Drosehn <gad@freebsd.org>, Doug Barton <dougb@freebsd.org>
Subject:   Re: Attempt #3, adding a new command 'sfilter'
Message-ID:  <200609071502.20654.jhb@freebsd.org>
In-Reply-To: <450065EC.7040604@elischer.org>
References:  <200608281545.k7SFjn6l063922@lurza.secnetix.de> <200609071057.44515.jhb@freebsd.org> <450065EC.7040604@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 07 September 2006 14:33, Julian Elischer wrote:
> John Baldwin wrote:
> 
> >On Wednesday 06 September 2006 21:15, Julian Elischer wrote:
> >  
> >
> >>Maxim Sobolev wrote:
> >>
> >>    
> >>
> >>>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 
> >>>      
> >>>
> >>
> >>perl is not lightweight to install on a machine.
> >>have you seen how much crap  gets installed when you add perl?
> >>
> >>lightweight is adding 100 instructions or so to 'date'.
> >>or adding the strftime instruction to awk (as it is in gawk)
> >>    
> >>
> >
> >Why not install the gawk port on the machines you need this on rather than 
> >perl and use gawk then?  It doesn't look to be that heavyweight of a port.
> >  
> >
> 
> so, instead of "add 20 lines of C and make something generally usefull, 
> install another entire program"

You said perl was too heavyweight, and that you would use awk if it supported 
it, so I pointed you at a relatively lightweight version of awk that does 
support it, and requires no code work at all. :)  The way the thread is going 
(sfilter, etc.) you're going to end up with an entirely new program 
anyway. :)  (I am of the opinion that sfilter will end up as a very limited 
poor-man's awk eventually anyway.)

-- 
John Baldwin



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