bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: --only-match


From: Daiki Ueno
Subject: Re: --only-match
Date: 10 May 2001 18:07:12 +0900
User-agent: T-gnus/6.15.3 (based on Oort Gnus v0.03)

>>>>> In <address@hidden> 
>>>>>   Miles Bader <address@hidden> wrote:
> Daiki Ueno <address@hidden> writes:
> > > My english writing skills are flaky but "--only-match" does not
> > > sound right.  Sorry I do not have any better alternative.
> > 
> > Okay, how about "--matching-string"?

> I think that's worse, in the sense that the option name gives me no good
> sense what it actually does.  I don't think the extra verbosity of
> `matching string' over `match' is useful.

> I like Paul's suggestion, although some people might think it's odd to
> use the --context option for such a special case.

I've heard that the perl script mg (stands for "multiline grep") has
similar option -c0, for example:

$ cat test.txt
aaatestaaatestbbb
abatestbaa

$ mg -c0 -E '[abc]+' test.txt
aaa
aaa
bbb
aba
baa

(Mg is available from ftp://ftp.iij.ad.jp/pub/IIJ/dist/utashiro/perl/)

I'm not well aware of uses of --context, but --context=0 is still
useful?  In current implementation of context control, it seems hard to
change the semantics of the context control options -C, -A, -B, because
the commonly used function context_length_arg only accepts a positive
integer.

Regards,
-- 
Daiki Ueno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]