From owner-freebsd-questions Fri May 18 7:32:42 2001 Delivered-To: freebsd-questions@freebsd.org Received: from plutus.concentric.net (plutus.concentric.net [207.155.197.42]) by hub.freebsd.org (Postfix) with ESMTP id 23D7037B422 for ; Fri, 18 May 2001 07:32:37 -0700 (PDT) (envelope-from jemurray@plutus.concentric.net) Received: by plutus.concentric.net (8.10.1/8.10.1) id f4IEWHr10247; Fri, 18 May 2001 09:32:17 -0500 (CDT) Date: Fri, 18 May 2001 09:32:17 -0500 From: "Jason E . Murray" To: Eric Boucher Cc: FreeBSD Subject: Re: Prog.: Knowing the exit code in command line Message-ID: <20010518093217.K407@concentric.net> References: <20010518141010.32324.qmail@web9406.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20010518141010.32324.qmail@web9406.mail.yahoo.com>; from eric_boucher60@yahoo.com on Fri, May 18, 2001 at 07:10:10AM -0700 X-URL: http://www.zweck.net Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Use $? to see exit codes... Example follows: [jemurray@plutus:~ >] ls fileexists; echo $? fileexists 0 <-- Exit Code [jemurray@plutus:~ >] ls filedoesnotexist; echo $? filedoesnotexist: No such file or directory 2 <-- Exit Code -- Jason E. Murray - http://www.zweck.net <>< Senior Systems and Network Administrator - XO Communications On Fri, May 18, 2001 at 07:10:10AM -0700, Eric Boucher wrote: > Hi there, > > I wanted to know something. I remember that somebody > told me that there were a way to know what is the exit > code a command line return. For exemple, imagine that > I've just type the command "ls -l" in a shell, if I > want to know the integer that Unix just return after > doing that command, what can I do? I think it's a > simple command with the "$" symbol, but I didn't > remember it. > > Thank you > > Eric > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message