Bug 190633 - odd -print behaviour
odd -print behaviour
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: findutils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-04 01:49 EDT by Dave Jones
Modified: 2015-01-04 17:27 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-05 11:29:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dave Jones 2006-05-04 01:49:23 EDT
Is this expected behaviour ? It seems odd to me.

(01:47:44:davej@nwo:tmp)$ touch a.c
(01:47:47:davej@nwo:tmp)$ touch a.h
(01:47:48:davej@nwo:tmp)$ ls *.c *.h
a.c  a.h
(01:47:52:davej@nwo:tmp)$ find . -name "*.c" -o -name "*.h"
./a.c
./a.h
(01:48:04:davej@nwo:tmp)$ find . -name "*.c" -o -name "*.h" -print
./a.h
(01:48:06:davej@nwo:tmp)$
Comment 1 Miloslav Trmač 2006-05-05 11:29:46 EDT
Yes, that's correct:
    find . -name "*.c" -o -name "*.h"
is equivalent to
    find . \( -name "*.c" -o -name "*.h" \) -print
OTOH
    find . -name "*.c" -o -name "*.h" -print
is
    find . -name "*.c" -o -name "*.h" -a -print
which is
    find . -name "*.c" -o \( -name "*.h" -a -print \)


Note You need to log in before you can comment on or make changes to this bug.