From owner-freebsd-questions@FreeBSD.ORG Mon May 19 10:10:06 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9E691065672 for ; Mon, 19 May 2008 10:10:06 +0000 (UTC) (envelope-from seb.morand@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by mx1.freebsd.org (Postfix) with ESMTP id 771E88FC1D for ; Mon, 19 May 2008 10:10:06 +0000 (UTC) (envelope-from seb.morand@gmail.com) Received: by wa-out-1112.google.com with SMTP id j4so1582592wah.3 for ; Mon, 19 May 2008 03:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=HsmQ4ccfic9dkWea06Fst+SiTYh01BLjJC5EeikRaiM=; b=QlN7VSKbQTI8bO8OQNc4Ni9XJYTp6OV8bAvJJbjejyofueG/zyAxHrpeyADkcWtVqAZBeb2XolLIctVmNLnqvNHcXWycEU2EwGWUon4738yrlOtBkjT3r2VFwCsS6g+hkAQ4URd9bha8jxcK5un36dlHME4qPoRrE7g9RucSnQY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=de93NokgRR5cIHCkx+dqHkLmZmlrdQpnX/M2pBzO+lQ5sSyZkaR6wF2DeIvPPZJwFY9mSETWrsc9/FCZyLwy7kIGwfVtKFUXxYBsbqZkcLv8l7+AYYFx2JJ9yQ9J9aeIR1AK2GwFNRtEP97D534aV40V5+k5rWk2tqU/z0kJchg= Received: by 10.114.195.19 with SMTP id s19mr7272439waf.58.1211190081231; Mon, 19 May 2008 02:41:21 -0700 (PDT) Received: by 10.114.173.14 with HTTP; Mon, 19 May 2008 02:41:21 -0700 (PDT) Message-ID: <16d3abd60805190241i2c2c0156ped93d96ba1f1971d@mail.gmail.com> Date: Mon, 19 May 2008 09:41:21 +0000 From: "=?ISO-8859-1?Q?S=E9bastien_Morand?=" To: "Garrett Cooper" In-Reply-To: <7d6fde3d0805190149y7a3bfa75j2ca6a67cef66e8f6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7d6fde3d0805190149y7a3bfa75j2ca6a67cef66e8f6@mail.gmail.com> Cc: questions@freebsd.org Subject: Re: Now what would you expect this to print out? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2008 10:10:06 -0000 > 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.