From owner-freebsd-questions Fri May 18 7:29:12 2001 Delivered-To: freebsd-questions@freebsd.org Received: from trinity.magpage.com (trinity.magpage.com [216.155.0.8]) by hub.freebsd.org (Postfix) with ESMTP id 219E337B422 for ; Fri, 18 May 2001 07:29:09 -0700 (PDT) (envelope-from dfrazier@magpage.com) Received: from magpage.com (dfrazier@poomba.magpage.com [216.155.24.136]) by trinity.magpage.com (8.11.3/8.11.3) with ESMTP id f4IET6x29404; Fri, 18 May 2001 10:29:06 -0400 (EDT) Message-ID: <3B0531B2.4655BDE1@magpage.com> Date: Fri, 18 May 2001 10:29:06 -0400 From: Daniel Frazier X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Eric Boucher Cc: FreeBSD Subject: Re: Prog.: Knowing the exit code in command line References: <20010518141010.32324.qmail@web9406.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-RRT-Status: UNKNOWN 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 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. > assuming bash or sh... echo $? will do the trick. -- ---------------------------------------------------------------------- Daniel Frazier Tel: 302-239-5900 Ext. 231 Systems Administrator Fax: 302-239-3909 MAGPAGE, We Power the Internet WWW: http://www.magpage.com/ "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin, Historical Review of Pennsylvania, 1759. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message