[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Findutils-patches] Re: [PATCH 06/19] Avoid false positives for the sc_p
From: |
Eric Blake |
Subject: |
[Findutils-patches] Re: [PATCH 06/19] Avoid false positives for the sc_prohibit_test_minus_ao syntax check. |
Date: |
Fri, 02 Apr 2010 16:56:05 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 |
On 04/02/2010 04:47 PM, James Youngman wrote:
> -find subdir -newer timestamp -a \
> - -exec test @address@hidden -nt timestamp \; -a \
> +find subdir -newer timestamp -and \
> + -exec test @address@hidden -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 @address@hidden/.svn -o -d @address@hidden/.git -o
> -d @address@hidden/CVS \; -print -prune
> +find repo/ -exec test -d @address@hidden/.svn -or -d @address@hidden/.git
> -or -d @address@hidden/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 @address@hidden/.svn \; -or -exec test -d
@address@hidden/.git \; -or
-exec test -d @address@hidden/CVS \; -print -prune
or even:
find repo/ -exec sh -c 'test -d "$1".svn || test -d "$1".git || test -d
"$1"/CVS' sh @address@hidden \; -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 address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Findutils-patches] [PATCH 01/19] Mark some missed error messages for translation., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 02/19] * cfg.mk: Explain that we cannot enable the sc_texinfo_acronym syntax check right now, since the perm.texi file uses @acronym{GNU} but we try to keep that in sync. with coreutils., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 05/19] Don't include xalloc.h where we don't use it., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 03/19] Fix some space-followed-by-tab sequences., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 06/19] Avoid false positives for the sc_prohibit_test_minus_ao syntax check., James Youngman, 2010/04/02
- [Findutils-patches] Re: [PATCH 06/19] Avoid false positives for the sc_prohibit_test_minus_ao syntax check.,
Eric Blake <=
- [Findutils-patches] [PATCH 04/19] Fix some compilation unused-result and missing-declaration warnings., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 08/19] Move safe_atoi out into a separate module., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 09/19] Remove some obsolete source files from POTFILES.in, James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 10/19] Remove files which exist but have no translated messages., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 11/19] Avoid sscanf. Avoid false positives for sc_prohibit_atoi_atof., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 07/19] configure.ac: Quote the first argument to AC_DEFINE., James Youngman, 2010/04/02