On 04/02/2010 04:47 PM, James Youngman wrote:
> -find subdir -newer timestamp -a \
> - -exec test @{...@} -nt timestamp \; -a \
> +find subdir -newer timestamp -and \
> + -exec test @{...@} -nt timestamp \; -and \
Good - in this case, the -a was an argument of find(1), not test(1), and
find(1) also understands -and.
> -find repo/ -exec test -d @{...@}/.svn -o -d @{...@}/.git -o -d @{...@}/CVS
> \; -print -prune
> +find repo/ -exec test -d @{...@}/.svn -or -d @{...@}/.git -or -d @{...@}/CVS
> \; -print -prune
Oops. That was a real case of test(1) being passed -o. Shouldn't this
be more like:
find repo/ -exec test -d @{...@}/.svn \; -or -exec test -d @{...@}/.git \; -or
-exec test -d @{...@}/CVS \; -print -prune
or even:
find repo/ -exec sh -c 'test -d "$1".svn || test -d "$1".git || test -d
"$1"/CVS' sh @{...@} \; -print -prune
> -.B find repo/ -exec test -d {}/.svn -o -d {}/.git -o -d {}/CVS \; \e
> +.B find repo/ -exec test -d {}/.svn -or -d {}/.git -or -d {}/CVS \; \e
Same example and therefore same bug, but in roff markup instead of texinfo.
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Findutils-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/findutils-patches
