Date: Fri, 18 May 2001 09:32:17 -0500 From: "Jason E . Murray" <jemurray@concentric.net> To: Eric Boucher <eric_boucher60@yahoo.com> Cc: FreeBSD <freebsd-questions@FreeBSD.ORG> Subject: Re: Prog.: Knowing the exit code in command line Message-ID: <20010518093217.K407@concentric.net> 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 References: <20010518141010.32324.qmail@web9406.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jmurray@xo.com> - 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010518093217.K407>