From owner-freebsd-questions@FreeBSD.ORG Wed Jan 9 20:37:39 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 72C2FBC3 for ; Wed, 9 Jan 2013 20:37:39 +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 4B956B5E for ; Wed, 9 Jan 2013 20:37:39 +0000 (UTC) Received: from mail5.sea5.speakeasy.net (mail5.sea5.speakeasy.net [69.17.117.49]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 94E63A72B2D for ; Wed, 9 Jan 2013 15:37:38 -0500 (EST) Received: (qmail 31125 invoked from network); 9 Jan 2013 20:37:38 -0000 Received: by simscan 1.4.0 ppid: 2360, pid: 12429, t: 0.1517s scanners: clamav: 0.88.2/m:52/d:10739 Received: from unknown (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail5.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 9 Jan 2013 20:37:37 -0000 Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.8]) by be-well.ilk.org (Postfix) with ESMTP id 8233933C36; Wed, 9 Jan 2013 15:37:32 -0500 (EST) Received: by lowell-desk.lan (Postfix, from userid 1147) id 46C2239855; Wed, 9 Jan 2013 15:37:32 -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> Date: Wed, 09 Jan 2013 15:37:32 -0500 In-Reply-To: <448v82unxb.fsf@lowell-desk.lan> (Lowell Gilbert's message of "Wed, 09 Jan 2013 15:00:32 -0500") Message-ID: <444niqum7n.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:37:39 -0000 Lowell Gilbert writes: > and I think the problem you're having is that the second "echo $?" > should be 2, although the others are correct at 0. Is that correct? 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.