From owner-freebsd-questions@FreeBSD.ORG Wed Jan 9 20:55:41 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A40861CB for ; Wed, 9 Jan 2013 20:55:41 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from asbnvacz-mailrelay01.megapath.net (asbnvacz-mailrelay01.megapath.net [207.145.128.243]) by mx1.freebsd.org (Postfix) with ESMTP id 7C993D41 for ; Wed, 9 Jan 2013 20:55:41 +0000 (UTC) Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.50]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 84DECA71097 for ; Wed, 9 Jan 2013 15:55:40 -0500 (EST) Received: (qmail 21228 invoked from network); 9 Jan 2013 20:55:40 -0000 Received: by simscan 1.4.0 ppid: 12451, pid: 16531, t: 0.1683s scanners: clamav: 0.88.2/m:52/d:10739 Received: from unknown (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 9 Jan 2013 20:55:39 -0000 Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.8]) by be-well.ilk.org (Postfix) with ESMTP id 5EA6C33C1D; Wed, 9 Jan 2013 15:55:34 -0500 (EST) Received: by lowell-desk.lan (Postfix, from userid 1147) id 19D7F39855; Wed, 9 Jan 2013 15:55:34 -0500 (EST) From: Lowell Gilbert To: Fbsd8 , FreeBSD questions Subject: Re: sh script problem with capturing return code References: <50EC9009.3030305@a1poweruser.com> <20130108224626.8c2d89cd.freebsd@edvax.de> <50EC99F2.3020404@a1poweruser.com> <44d2xevlhb.fsf@lowell-desk.lan> <50ED88CF.7060308@a1poweruser.com> <448v82unxb.fsf@lowell-desk.lan> <444niqum7n.fsf@lowell-desk.lan> Date: Wed, 09 Jan 2013 15:55:34 -0500 In-Reply-To: <444niqum7n.fsf@lowell-desk.lan> (Lowell Gilbert's message of "Wed, 09 Jan 2013 15:37:32 -0500") Message-ID: <44zk0it6t5.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2013 20:55:41 -0000 Lowell Gilbert writes: > It's not; ignore my example. The extra directory was under the ignored > directory, so it's testing the right properties. I think if I create the > new subdirectory under the other main directory, it would be right. Confirmed. The test case now looks like this: ================================================================ mkdir etc home mtree -c -d > ../out mtree -d < ../out echo $? echo "That was the first: should be 0." mkdir etc/temp mtree -u -d < ../out echo $? echo "That was the second: should be 2." sed -i "" 's/^\(home[ ]*\)\(.*\)$/\1ignore/' ../out mtree -d < ../out echo $? echo "That was the third: should be 0." ================================================================ I think it's a real bug, and the test cases don't cover "extra" elements at all. Now I just have to figure out the right fix.