Re: [PATCH for 2.4] fix find to not stumble over BK

Alan Cox (alan@lxorguk.ukuu.org.uk)
17 Jul 2002 02:40:33 +0100


On Wed, 2002-07-17 at 01:08, Larry McVoy wrote:

> Note that common usage
>
> find . -name '*.[chS]' | whatever
>
> becomes
>
> find . -name SCCS -prune -o -name BitKeeper -prune -o \
> -name '*.[chS]' -print | whatever
> ^^^^^^
>
> The -print is needed or find will produce nothing, it's now multiple clauses.

The -print is not needed. See IEEE Std 1003.1-2001

If no expression is present, -print shall be used as the expression.
Otherwise, if the given expression does not contain any of the primaries
-exec, -ok, or -print, the given expression shall be effectively
replaced by:

( given_expression ) -print

Alan the pedantic

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/