Subject: Re: bin/12536: find defaults to -printing -pruned off -or expressions
To: None <cgd@sibyte.com>
From: Ben Harris <bjh21@netbsd.org>
List: netbsd-bugs
Date: 04/04/2001 18:57:09
In article <yov5d7as1u2f.fsf@highland.sibyte.com> you write:
>jhawk@mit.edu (John Hawkinson) writes:
>> 	When the find command has two operands of an -or operator,
>> if no -print is specified, it defaults to applying -print to both operands,
>> not merely to the second operand.
>
>Yes.  I believe that that's because the POSIX.2 standard said that
>without an operator that caused 'output' (however they put that, iirc
>the standard ones being being: -print, -ls, -exec), the behaviour

-exec, -ok and -print, actually.  -ls isn't in POSIX.

>My recollection is that our '-print' behaviour is correct, but that's
>fuzzy since it dates back to '93 or '94,

Checked with my pet copy of POSIX.2.  Your recollection is correct.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>