Path: utzoo!attcan!uunet!husc6!mailrus!ames!ncar!boulder!spot!wu From: wu@spot.Colorado.EDU (WU SHI-KUEI) Newsgroups: comp.unix.questions Subject: Re: test the exit status inside a shell Keywords: exit status Message-ID: <3741@boulder.Colorado.EDU> Date: 28 Sep 88 21:15:07 GMT References: <5651@sgistl.SGI.COM> Sender: news@boulder.Colorado.EDU Reply-To: wu@spot.Colorado.EDU (WU SHI-KUEI) Organization: University of Colorado, Boulder Lines: 11 In article <5651@sgistl.SGI.COM> larry@sgistl.SGI.COM (Larry Autry) writes: >Is there a way to test the exit status of the previously executed process >while in a shell? In other words, if the previous program returned an exit >status of (2) (or even (0)), then perform something based upon that return >value. The shell variable $? is set to the exit status of the last executed command. Just a guest here - In real life Carl Brandauer {ncar|stcvax}!nbires!bdaemon!carl