Date: Mon, 19 May 2008 09:41:21 +0000 From: "=?ISO-8859-1?Q?S=E9bastien_Morand?=" <seb.morand@gmail.com> To: "Garrett Cooper" <yanefbsd@gmail.com> Cc: questions@freebsd.org Subject: Re: Now what would you expect this to print out? Message-ID: <16d3abd60805190241i2c2c0156ped93d96ba1f1971d@mail.gmail.com> In-Reply-To: <7d6fde3d0805190149y7a3bfa75j2ca6a67cef66e8f6@mail.gmail.com> References: <7d6fde3d0805190149y7a3bfa75j2ca6a67cef66e8f6@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> Riddle for the day for folks that have source trees... what would you expect > this to print out (ask yourself the question and then execute the command)? > > find /usr/src -name Makefile -or -name '*.mk' -print > > The expected output and what actual output differed in my mind, but maybe > somebody else can "shed some light" on the logic behind what happened [I > read through the find(1) code and can see why it does what it does, but I > still don't find the result useful]. Looks like you wanted to do this: find /usr/src \( -name Makefile -o -name '*.mk' \) -print Implicit operator is and (-a) and is arithmetic, and is equivalent to multiplication, or is equivalent to addition ... so and as the priority.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16d3abd60805190241i2c2c0156ped93d96ba1f1971d>