[PATCH] find ! ... (operator -not)

Denis Vlasenko vda.linux at googlemail.com
Sun Feb 4 17:10:57 UTC 2007


On Friday 02 February 2007 22:43, Denis Vlasenko wrote:
> On Friday 02 February 2007 16:01, Natanael Copa wrote:
> > Hi,
> > 
> > Attatched is a patch for support of the '!' operator for find.
> > 
> > I created another macro ALLOC_TEST for actions that can be inverted with
> > '!'. They are not really actions (like -print) but tests (like -name).
> > 
> > It should not touch anything unless you have enabled the
> > FEATURE_FIND_NOT config option.
> 
> parse_params():
> invert_flag is never reset to 0. This must be a bug -
> "not" shouldn't be applied to the second -name here, I think
> (did not check it versus GNU find, tho...):
> find ! -name '*.a' -o -name '*.b'

I did it myself. find ! support is in svn. Please test.
--
vda



More information about the busybox mailing list