bug-grep
[Top][All Lists]
Advanced

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

Re: when options conflict


From: Paul Eggert
Subject: Re: when options conflict
Date: Sat, 12 Nov 2005 23:44:02 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Charles Levert <address@hidden> writes:

> What do other grep implementations do (for
> those that support extended options that lend
> themselves to feature interaction problems)?

I just checked Solaris 10 /usr/xpg4/bin/grep, and
it reports an error if you specify both -E and -F.

Personally I prefer the POSIX guidelines: that is, the order of
options should not matter.  Often this can be done by interpreting the
meanings of options appropriately.  For example, with diffutils if you
specify

diff -c -C 4

then this is equivalent to

diff -C 3 -C 4

which in turn is equivalent to diff -C 4, since if you ask for N lines
of context and then ask for M lines of context, diff takes the
greater.  Hence the order of options is not material.




reply via email to

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