bug-findutils
[Top][All Lists]
Advanced

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

Re: [find] enable paths starting with a comma


From: Andreas Metzler
Subject: Re: [find] enable paths starting with a comma
Date: Sun, 3 Aug 2003 14:27:41 +0200
User-agent: Mutt/1.3.28i

On Sun, Aug 03, 2003 at 11:46:51AM +0100, James Youngman wrote:
> On Sat, Aug 02, 2003 at 07:09:42PM +0200, Michael Teichgr?ber wrote:
[comma treated specially] 
> Yes, this is because of the behaviour documented in the find(1) manual page :-
> 
> ||     The first argument that begins with `-', `(', `)', `,', or
> ||     `!' is taken to be the beginning of  the  expression;  any
> ||     arguments before it are paths to search, and any arguments
> ||     after it are the rest of the expression.  If no paths  are
> ||     given, the current directory is used.  If no expression is
> ||     given, the expression `-print' is used.
> 
> 
> I suggest that you consider using this instead :-
> 
>    find ./,foo -type f -print
> 
> That will achieve what you want without requiring find to be patched.
> However, I can't immediately see why a comma is treated in the way you
> describe.
 
> Does anybody on the list know why find(1) treats the comma in this
> way?  Perhaps this is a POSIX standard - I'm at a conference and don't
> have an opportunity to refer to the POSIX standard just now.

Afaict, no.

Quoting Susv3 (IEEE Std 1003.1-2001):
The first argument that starts with a '-' , or is a '!' or a '(' , and
all subsequent arguments shall be interpreted as an expression made up
of the following primaries and operators. [...]
              cu andreas




reply via email to

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