Tool -flag considered harmful (was: grep replacement)

Barry Shein bzs at bu-cs.BU.EDU
Fri Jun 17 00:54:53 AEST 1988


>From andrew at alice
>there are some technical problems with printing context, particluarly
>if you want regular expreesion-defind contexts. it means you have to be
>able to run the sodding regexp stuff backwards thru the text. it also
>means keeping a lot of buffer which is more than a little repugnant.

Why not look for "starts" as you search forward and (re)start
buffering from there? No need to search backwards after the match, in
fact it would be counter-productive (either you need to seek a pipe or
save everything, of course saving a seek pointer to last start on
streams that support it might be a rational optimization, but it's not
necessary if you save starts as you go.)

I don't know what "repugnant" means in any context that can be answered.

>despite all this, it is feasible but not trivial to add context stuff.
>i won't do it though.

Of course, that is your decision, I was just trying to provide helpful
comments as was requested.

	-Barry Shein, Boston University



More information about the Comp.unix.questions mailing list