Xref: utzoo comp.unix.i386:7551 comp.unix.wizards:23292 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!samsung!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.i386,comp.unix.wizards Subject: Re: cd failure killing script [Re: Interactive 2.2 File zapper] Message-ID: <3819@auspex.auspex.com> Date: 5 Aug 90 00:20:39 GMT References: <772@essnj1.ESSNJAY.COM> <2108@cirrusl.UUCP> <1990Aug3.022641.28848@cbnewse.att.com> Followup-To: comp.unix.wizards Organization: Auspex Systems, Santa Clara Lines: 12 >If you want a failed cd to kill the script, then do... If you want a failed "cd" to kill the script, don't bother doing anything. The SunOS 4.0.3 Bourne shell, based on the S5R3.1 one, will kill the script if a "cd" fails; I checked the source code to the 4.3BSD Bourne shell, based on the V7 one, and it appears as if it'll do the same. Given that, and given that, as far as I know, neither Sun nor Berkeley introduced this feature, it's probably in most if not all UNIX Bourne shells, going back at least as far as V7 (it existed, at least within Bell Labs, before V7 came out; I can't speak for those versions).