From owner-freebsd-newbies Tue Jun 23 07:47:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA26593 for freebsd-newbies-outgoing; Tue, 23 Jun 1998 07:47:47 -0700 (PDT) (envelope-from owner-freebsd-newbies@FreeBSD.ORG) Received: from sumatra.americantv.com (sumatra.americantv.com [207.170.17.37]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA26573 for ; Tue, 23 Jun 1998 07:47:41 -0700 (PDT) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id JAA14528; Tue, 23 Jun 1998 09:47:29 -0500 (CDT) Received: (from jlemon@localhost) by right.PCS (8.6.13/8.6.4) id JAA28639; Tue, 23 Jun 1998 09:46:56 -0500 Message-ID: <19980623094656.44285@right.PCS> Date: Tue, 23 Jun 1998 09:46:56 -0500 From: Jonathan Lemon To: David Wolfskill Cc: fewtch@serv.net, freebsd-newbies@FreeBSD.ORG Subject: Re: Latest discoveries... References: <199806230006.RAA00408@pau-amma.whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61.1 In-Reply-To: <199806230006.RAA00408@pau-amma.whistle.com>; from David Wolfskill on Jun 06, 1998 at 05:06:53PM -0700 Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Jun 06, 1998 at 05:06:53PM -0700, David Wolfskill wrote: > [ ... ] > > "&&" would be used for a situation where the command to the (immediate) > right of the separator should be executed after the left-hand command > has terminated with a zero return code. If the left-hand command > terminates with a non-zero return code, the right-hand command will not > be executed. > > [ ... ] > > FAIR WARNING: Not all commands are well-behaved with respect to > terminating with return codes that are useful for this type of thing. > It is usual for different commands to be implemented by different (sets > of) people for different reasons with different goals. If you are in > doubt, test first... and check the documentation, as well, so that even Yes, I'm aware of the boolean shortcircuit/linking operators, but the above paragraph is why I tend to shy away from them. I regularly use a mixture of at least 4 unix systems (Sequent, Sun, FreeBSD, HPUX), and the return codes are not exactly what I would call uniform across the various systems. My fingers tend to go faster than my brain, so sometimes I would rattle off a command and then thwap before a slow signal reached my fingers: "NO, not on _this_ system, you dolt!" Sigh. Just call me paranoid. And this probably isn't a -newbie topic either. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message